diff options
author | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-03-28 18:45:20 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-03-28 18:45:20 -0700 |
commit | 94486adcec799489c9d4118ea36152327e975584 (patch) | |
tree | 8915a5bdb998ef3c03f925e632b1f759ae93d342 | |
parent | a36f1c4c25b9da052295ec26ed60fbfbd82339f0 (diff) | |
download | cash-94486adcec799489c9d4118ea36152327e975584.tar.gz cash-94486adcec799489c9d4118ea36152327e975584.zip |
Slight progress on mailcert.sh
-rwxr-xr-x | mailcert.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mailcert.sh b/mailcert.sh index 6002a1e..33a8467 100755 --- a/mailcert.sh +++ b/mailcert.sh @@ -54,4 +54,18 @@ echo USEREMAIL is assumed to be: "$USEREMAIL" echo Press Ctrl-C if any of this looks incorrect. sleep 5 +[[ $(openssl x509 -in omgca/ca/omgca.crt -noout -subject) =~ .+CN=(.+) ]] +CACN="${BASH_REMATCH[1]}" +if [[ "$CACN" =~ (.+)/emailAddress.+ ]]; then + CACN=${BASH_REMATCH[1]} +fi + # FIXME: implement /usr/lib/sendmail input, including attachment syntax +# /usr/lib/sendmail -t << EOF +cat << EOF +To: "$USEREMAIL" +From: "$E" +Subject: Certificate from "$CACN" +MIME-Version: 1.0 +Content-Type: + |