Commit c5d71104 authored by nimrod's avatar nimrod
Browse files

- Removed lint target, pre-commit already handles that.

- Filled in fields in license.
- Removed useless checks in pre-commit.
- Added make test check to pre-commit.
- Added Travis CI.
- Updated README accordingly.
parent 2dc445ab
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -2,21 +2,17 @@
    sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f
    hooks:
    -   id: check-added-large-files
    -   id: check-json
    -   id: check-xml
    -   id: check-yaml
    -   id: check-merge-conflict
-   repo: https://www.shore.co.il/git/shell-pre-commit/
    sha: v0.1.0
    hooks:
    -   id: shell-lint
        files: ssl-ca
-   repo: local
    hooks:
    -   id: local_test
    -   id: test
        name: make test
        entry: make test
        language: system
        always_run: True
        files: Makefile

-   repo: https://www.shore.co.il/git/shell-pre-commit/
    sha: 604fe77b53d3514d5ad0f66764c7783850bb6e98
    hooks:
    -   id: shell-lint
        files: ssl-ca
        files: Makefile|ssl-ca

.travis.yml

0 → 100644
+27 −0
Original line number Diff line number Diff line
---
language: python
python: "2.7"
dist: trusty
sudo: false
group: beta
cache:
  - pip
  - directories:
      - $HOME/.pre-commit

addons:
  apt:
    packages:
      - mawk
      - openssl
      - curl
      - build-essential

install:
  - pip install pre_commit

script:
  - pre-commit run --all-files

notifications:
  email: false
+2 −2
Original line number Diff line number Diff line
The MIT License (MIT)
MIT License

Copyright (c) [year] [fullname]
Copyright (c) 2016 Adar Nimrod

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+2 −9
Original line number Diff line number Diff line
.PHONY: install clean test lint
.PHONY: install test

install:
	cp ssl-ca /usr/local/bin/ssl-ca
	chmod 755 /usr/local/bin/ssl-ca

clean:
	if [ -f .server.pid ]; then kill "$$(cat .server.pid)"; fi
	rm -rf openssl.cnf certs keys CA.key CA.crt CA.p12 CA.srl .server.pid

lint:
	/bin/sh -en ssl-ca

test: clean lint
test:
	./ssl-ca init
	test "$$(openssl rsa -noout -check -in CA.key)" = "RSA key ok"
	test "$$(openssl verify -CAfile CA.crt CA.crt)" = "CA.crt: OK"
+6 −7
Original line number Diff line number Diff line
SSL-CA
######

.. image:: https://travis-ci.org/adarnimrod/ssl-ca.svg?branch=master
    :target: https://travis-ci.org/adarnimrod/ssl-ca

This utility automates generating an SSL certificate authority, keys and signed
certificates. The dependencies are: OpenSSL, cURL git and make (for testing and
installation, although you can just copy the file). The use case in mind is
@@ -68,10 +71,9 @@ other cert on the internet.
Development
-----------

To ease development :code:`make clean`, :code:`make lint` and :code:`make test`
are available. It's recommended to add :code:`make lint`  and :code:`make test`
to to your Git pre-commit and pre-push hooks accordingly. Also, this repo has
`pre-commit <http://pre-commit.com/>`_ configured.
For testing run :code:`make test`. For cleaning temporary files run :code:`git
clean -fdx`. You can use `pre-commit <http://pre-commit.com/>`_ to have the test
(which is quite quick) run on every commit to ensure quality code.

License
-------
@@ -86,6 +88,3 @@ Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
at: https://www.shore.co.il/cgit/.

TODO
----