From 4006fc279fdcd3cebe6650c9e37a243242270698 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sat, 2 Apr 2011 22:38:13 -0700 Subject: mailcert.sh: un-hard-coding a thing that should not have been hardcoded --- mailcert.sh | 3 +-- 1 file changed, 1 insertion(+), 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]} -- cgit v1.2.3