summaryrefslogtreecommitdiff
path: root/mailcert.sh
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-04-02 22:38:13 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-04-02 22:38:13 -0700
commit4006fc279fdcd3cebe6650c9e37a243242270698 (patch)
tree4efd9c324b689377d3c2481a58b85f672ac6dd96 /mailcert.sh
parent1c3f9b0e9e9beb452b5c76f754ed2d3d335e7694 (diff)
downloadcash-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-xmailcert.sh3
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]}