aboutsummaryrefslogtreecommitdiff
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-09-27 22:30:08 -0300
committerDavid Bremner <david@tethera.net>2021-09-29 20:04:31 -0300
commit4760b4470c5d5782e52bd1a7761d9975a1db1fec (patch)
tree8ae2a39206e7a95f6e95d8421c791e91222f80ed /test/test-lib.sh
parent8e59438025c88ebd83a78cf12c06ff954d979e01 (diff)
test/T355-smime: Use key as exported by gpgsm
As reported in id:87h7pxiek3.fsf@tethera.net, the previous version of the test is flaky. There is some so-far undebugged interaction between openssl and gpgsm that causes the keys to fail to import. As a potential workaround, use the key as exported by gpgsm, and eliminate openssl from this particular pipeline.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index dc4962f5..32f710a5 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -143,10 +143,8 @@ add_gpgsm_home () {
_gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }
at_exit_function _gnupg_exit
mkdir -p -m 0700 "$GNUPGHOME"
- openssl pkcs12 -export -passout pass: -inkey "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" \
- < "$NOTMUCH_SRCDIR/test/smime/test.crt" | \
- gpgsm --batch --no-tty --no-common-certs-import --pinentry-mode=loopback --passphrase-fd 3 \
- --disable-dirmngr --import >"$GNUPGHOME"/import.log 2>&1 3<<<''
+ gpgsm --batch --no-tty --no-common-certs-import --pinentry-mode=loopback --passphrase-fd 3 \
+ --disable-dirmngr --import >"$GNUPGHOME"/import.log 2>&1 3<<<'' <$NOTMUCH_SRCDIR/test/smime/0xE0972A47.p12
fpr=$(gpgsm --batch --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p')
echo "$fpr S relax" >> "$GNUPGHOME/trustlist.txt"
gpgsm --quiet --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/ca.crt