Add usage to script

This commit is contained in:
Jordan Holt 2022-03-21 11:52:18 +00:00
parent 41b00d960d
commit 3f9d085a96
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520

View File

@ -69,3 +69,20 @@ revoke_cert() {
view_crl() {
openssl crl -in crl/intermediate.crl.pem -noout -text
}
operation=$1
case $operation in
cert) create_cert "$@" ;;
crl) view_crl ;;
revoke) revoke_cert "$@" ;;
init) create_ca "$@" ;;
'')
printf 'usage: cactl <operation>\n'
printf 'operations:\n'
printf ' cactl cert <domain> Create a new certificate\n'
printf ' cactl crl View revoked certificates\n'
printf ' cactl revoke <domain> Revoke a certificate\n'
printf ' cactl init Initialise a new CA\n'
;;
esac