summaryrefslogtreecommitdiff
path: root/tests/email-print-mime-structure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/email-print-mime-structure.sh')
-rwxr-xr-xtests/email-print-mime-structure.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/email-print-mime-structure.sh b/tests/email-print-mime-structure.sh
index 0b70d73..6e510ca 100755
--- a/tests/email-print-mime-structure.sh
+++ b/tests/email-print-mime-structure.sh
@@ -11,15 +11,22 @@ test_eml() {
for eml in tests/email-print-mime-structure/*.eml; do
base="${eml%%.eml}"
pgpkey="$base.pgpkey"
+ p12key="$base.p12"
if [ -e "$pgpkey" ]; then
printf "Testing %s (PGPy)\n" "${eml##*/}"
test_eml "$base" --pgpkey "$pgpkey"
testgpghome=$(mktemp -d)
- printf "Testing %s (GnuPG)\n" "${eml##*/}"
+ printf "Testing %s (GnuPG PGP/MIME)\n" "${eml##*/}"
gpg --homedir="$testgpghome" --batch --quiet --import <"$pgpkey"
GNUPGHOME="$testgpghome" test_eml "$base" --use-gpg-agent
rm -rf "$testgpghome"
+ elif [ -e "$p12key" ]; then
+ 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"
+ GNUPGHOME="$testgpghome" test_eml "$base" --use-gpg-agent
+ rm -rf "$testgpghome"
else
printf "Testing %s\n" "${eml##*/}"
test_eml "$base"