]> git.cworth.org Git - notmuch/commitdiff
T355: specify hash algorithm explicitly
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>
Mon, 3 Aug 2020 15:40:57 +0000 (22:40 +0700)
committerDavid Bremner <david@tethera.net>
Sat, 8 Aug 2020 19:04:27 +0000 (16:04 -0300)
On some systems (notably, the one shipped with LibreSSL),
default fingerprint digest algorithm is SHA256.

On other systems, users can change default digest algorithm by changing
default_md in /etc/ssl/default_md.

Let's ask openssl to provide us specific algorithm to make the test
more deterministic.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
test/T355-smime.sh

index f8cec62ca8b73232bcf20af961201e57309e3faf..8b2b52be032a34ec539ee673ffa8fee23dc8dc3d 100755 (executable)
@@ -6,7 +6,7 @@ test_description='S/MIME signature verification and decryption'
 test_require_external_prereq openssl
 test_require_external_prereq gpgsm
 
-FINGERPRINT=$(openssl x509 -fingerprint -in "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" -noout | sed -e 's/^.*=//' -e s/://g)
+FINGERPRINT=$(openssl x509 -sha1 -fingerprint -in "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" -noout | sed -e 's/^.*=//' -e s/://g)
 
 add_gpgsm_home