Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -2,21 +2,17 @@ ...@@ -2,21 +2,17 @@
sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-json
- id: check-xml
- id: check-yaml - id: check-yaml
- id: check-merge-conflict - 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 - repo: local
hooks: hooks:
- id: local_test - id: test
name: make test name: make test
entry: make test entry: make test
language: system language: system
always_run: True files: Makefile|ssl-ca
files: Makefile
- repo: https://www.shore.co.il/git/shell-pre-commit/
sha: 604fe77b53d3514d5ad0f66764c7783850bb6e98
hooks:
- id: shell-lint
files: ssl-ca
---
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
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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
.PHONY: install clean test lint .PHONY: install test
install: install:
cp ssl-ca /usr/local/bin/ssl-ca cp ssl-ca /usr/local/bin/ssl-ca
chmod 755 /usr/local/bin/ssl-ca chmod 755 /usr/local/bin/ssl-ca
clean: test:
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
./ssl-ca init ./ssl-ca init
test "$$(openssl rsa -noout -check -in CA.key)" = "RSA key ok" test "$$(openssl rsa -noout -check -in CA.key)" = "RSA key ok"
test "$$(openssl verify -CAfile CA.crt CA.crt)" = "CA.crt: OK" test "$$(openssl verify -CAfile CA.crt CA.crt)" = "CA.crt: OK"
......
SSL-CA 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 This utility automates generating an SSL certificate authority, keys and signed
certificates. The dependencies are: OpenSSL, cURL git and make (for testing and 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 installation, although you can just copy the file). The use case in mind is
...@@ -68,10 +71,9 @@ other cert on the internet. ...@@ -68,10 +71,9 @@ other cert on the internet.
Development Development
----------- -----------
To ease development :code:`make clean`, :code:`make lint` and :code:`make test` For testing run :code:`make test`. For cleaning temporary files run :code:`git
are available. It's recommended to add :code:`make lint` and :code:`make test` clean -fdx`. You can use `pre-commit <http://pre-commit.com/>`_ to have the test
to to your Git pre-commit and pre-push hooks accordingly. Also, this repo has (which is quite quick) run on every commit to ensure quality code.
`pre-commit <http://pre-commit.com/>`_ configured.
License License
------- -------
...@@ -86,6 +88,3 @@ Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website ...@@ -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 <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 <http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
at: https://www.shore.co.il/cgit/. at: https://www.shore.co.il/cgit/.
TODO
----
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment