diff options
author | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-04-02 22:38:13 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-04-02 22:38:13 -0700 |
commit | 4006fc279fdcd3cebe6650c9e37a243242270698 (patch) | |
tree | 4efd9c324b689377d3c2481a58b85f672ac6dd96 /mailcert.sh | |
parent | 1c3f9b0e9e9beb452b5c76f754ed2d3d335e7694 (diff) | |
download | cash-4006fc279fdcd3cebe6650c9e37a243242270698.tar.gz cash-4006fc279fdcd3cebe6650c9e37a243242270698.zip |
mailcert.sh: un-hard-coding a thing that should not have been hardcoded
Diffstat (limited to 'mailcert.sh')
-rwxr-xr-x | mailcert.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mailcert.sh b/mailcert.sh index f8314de..714bde4 100755 --- a/mailcert.sh +++ b/mailcert.sh @@ -24,7 +24,6 @@ if [ -e "$CA"/certs/"$1".pem ]; then # serial elif [ -e "$CA"/signed/"$1".crt ]; then # certname USERCERT="$CA"/signed/"$1".crt elif [ -e "$1" ]; then # certfile (ugh!) -# omgca/signed/test.crt USERCERT="$1" if [[ "$1" =~ (.+/|())(.+)/.+/.+ ]]; then CA="${BASH_REMATCH[3]}" @@ -58,7 +57,7 @@ echo "" echo Press Ctrl-C if any of this looks incorrect, otherwise hit enter. read -[[ $(openssl x509 -in omgca/ca/omgca.crt -noout -subject) =~ .+CN=(.+) ]] +[[ $(openssl x509 -in "$CACERT" -noout -subject) =~ .+CN=(.+) ]] CACN="${BASH_REMATCH[1]}" if [[ "$CACN" =~ (.+)/emailAddress.+ ]]; then CACN=${BASH_REMATCH[1]} |