summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]}