]> git.notmuchmail.org Git - notmuch/commitdiff
tests/smime: Always use --batch with gpgsm
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 28 Apr 2020 18:57:10 +0000 (14:57 -0400)
committerDavid Bremner <david@tethera.net>
Thu, 30 Apr 2020 20:53:43 +0000 (17:53 -0300)
GnuPG's gpgsm, like gpg, should always be used with --batch when it is
invoked in a non-interactive environment.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
test/test-lib.sh

index 6a62b5c1568a82c0891d32085764c903797a9171..d4fcea5aa77730f6c43cab689ffef942e155a8c6 100644 (file)
@@ -136,8 +136,8 @@ add_gpgsm_home ()
     _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }
     at_exit_function _gnupg_exit
     mkdir -m 0700 "$GNUPGHOME"
-    gpgsm --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/test.crt >"$GNUPGHOME"/import.log 2>&1
-    fpr=$(gpgsm  --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p')
+    gpgsm --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/test.crt >"$GNUPGHOME"/import.log 2>&1
+    fpr=$(gpgsm --batch --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p')
     echo "$fpr S relax" >> $GNUPGHOME/trustlist.txt
     test_debug "cat $GNUPGHOME/import.log"
 }