Created
April 19, 2017 10:21
-
-
Save lewismarshall/3da755cd4ee26f873cc5976cb9fb4dd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function generate_ca() { | |
if [[ ! -f tests/certs/${1}/ca.key ]]; then | |
mkdir -p tests/certs/${1} | |
cfssl gencert -initca tests/certs/ca-csr.json | cfssljson -bare tests/certs/${1}/ca | |
mv tests/certs/${1}/ca.pem tests/certs/${1}/ca.crt | |
mv tests/certs/${1}/ca-key.pem tests/certs/${1}/ca.key | |
fi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment