Add a simple script for self-signing CSRs with local trusted CA

This commit is contained in:
Danielle McLean 2017-04-14 00:36:34 +10:00
parent 0da3a29d27
commit e8f9143b1b
Signed by: 00dani
GPG key ID: 3844A6973C6058F1

7
local/bin/sign-with-own-ca Executable file
View file

@ -0,0 +1,7 @@
#!/bin/zsh
if ! [[ -r $1 ]]; then
print "Usage: $0 path/to/request.csr" >&2
exit 1
fi
ca=/etc/ssl/$HOST/root
sudo openssl x509 -req -CA $ca.crt -CAkey $ca.key -CAcreateserial -sha256 -days 30 -in $1 -out ${1:r}.crt