diff options
author | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2020-02-26 16:22:45 -0800 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2020-02-26 16:22:45 -0800 |
commit | 98ebf8956b723b12de652104a6391c26cc638ff9 (patch) | |
tree | ecb6fd9eafbab7ea8dfbfa6f58eaab556ae66d78 /revoke.sh | |
parent | 2a91b707a4a81b8efacd2c66a0fc79937d3c6828 (diff) | |
download | cash-98ebf8956b723b12de652104a6391c26cc638ff9.tar.gz cash-98ebf8956b723b12de652104a6391c26cc638ff9.zip |
revoke: add unified password input.
/proc/x/environ is reportedly 0444 on some Unicies, but oh well.
Diffstat (limited to 'revoke.sh')
-rwxr-xr-x | revoke.sh | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -22,15 +22,23 @@ else echo "$0 [certfile|certname|serial] (configfile)" exit 2 fi - + +echo -n Enter the passphrase for "$CA"/ca/"$CA".key:\ +read -s PASS +echo +export PASS + # Gen signed key echo Adding revocation to index... -openssl ca -config "$OPENSSL_CONFIG" -revoke "$CERT" +openssl ca -config "$OPENSSL_CONFIG" -passin env:PASS -revoke "$CERT" echo Building and signing CRL... -openssl ca -config "$OPENSSL_CONFIG" -gencrl -out "$CA"/ca/"$CA".crl +openssl ca -config "$OPENSSL_CONFIG" -passin env:PASS -gencrl -out "$CA"/ca/"$CA".crl echo openssl crl -in "$CA"/ca/"$CA".crl -text -noout echo + +export -n PASS + if [ -x ./post-revoke ]; then ./post-revoke "$CA"/ca/"$CA".crl "$CERT" else |