]> git.notmuchmail.org Git - notmuch/commit - test/T356-protected-headers.sh
smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 22 May 2020 00:42:41 +0000 (20:42 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 23 May 2020 01:04:57 +0000 (22:04 -0300)
commitb14d9ae204dedab0b63ab54fc6d59ffe7090ba88
tree59d7c881cbe46db4f19e8c3bcd35e2c70de517e0
parent627460d7bbbb6b95a07084c2b6fc7f647a5547e1
smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7

When checking cryptographic signatures, Notmuch relies on GMime to
tell it whether the certificate that signs a message has a valid User
ID or not.

If the User ID is not valid, then notmuch does not report the signer's
User ID to the user.  This means that the consumer of notmuch's
cryptographic summary of a message (or of its protected headers) can
be confident in relaying the reported identity to the user.

However, some versions of GMime before 3.2.7 cannot report Certificate
validity for X.509 certificates.  This is resolved upstream in GMime
at https://github.com/jstedfast/gmime/pull/90.

We adapt to this by marking tests of reported User IDs for
S/MIME-signed messages as known-broken if GMime is older than 3.2.7
and has not been patched.

If GMime >= 3.2.7 and certificate validity still doesn't work for
X.509 certs, then there has likely been a regression in GMime and we
should fail early, during ./configure.

To break out these specific User ID checks from other checks, i had to
split some tests into two parts, and reuse $output across the two
subtests.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
configure
test/T355-smime.sh
test/T356-protected-headers.sh