diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2019-11-25 16:45:49 -0500 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-11-28 11:09:01 -0700 |
commit | 15ed2184e61e40a35e56921aa57a49726f56b5c2 (patch) | |
tree | dcbfc5dee613788a87a4b747dad95a66f64dff75 /tests/email-print-mime-structure.sh | |
parent | 3c84e68d79ed84f916f1b983168d58e0f360686b (diff) | |
download | mailscripts-15ed2184e61e40a35e56921aa57a49726f56b5c2.tar.gz |
email-print-mime-structure: decrypt S/MIME parts with OpenSSL
If the user supplies a secret key like the ones found in
https://www.ietf.org/id/draft-dkg-lamps-samples-01.html, then
email-print-mime-structure will try to use that for decryption of
CMS-encrypted (S/MIME) message parts.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Acked-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'tests/email-print-mime-structure.sh')
-rwxr-xr-x | tests/email-print-mime-structure.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/email-print-mime-structure.sh b/tests/email-print-mime-structure.sh index 6e510ca..b45294e 100755 --- a/tests/email-print-mime-structure.sh +++ b/tests/email-print-mime-structure.sh @@ -22,6 +22,12 @@ for eml in tests/email-print-mime-structure/*.eml; do GNUPGHOME="$testgpghome" test_eml "$base" --use-gpg-agent rm -rf "$testgpghome" elif [ -e "$p12key" ]; then + printf "Testing %s (OpenSSL)\n" "${eml##*/}" + grep -v ^- < "$p12key" | base64 -d | \ + openssl pkcs12 -nocerts -nodes -passin pass: -passout pass: -out "$base.pemkey" + test_eml "$base" --cmskey "$base.pemkey" + rm -f "$base.pemkey" + testgpghome=$(mktemp -d) printf "Testing %s (GnuPG S/MIME)\n" "${eml##*/}" gpgsm --pinentry-mode=loopback --passphrase-fd 4 4<<<'' --homedir="$testgpghome" --batch --quiet --import <"$p12key" |