diff options
| author | David Bremner <david@tethera.net> | 2022-04-12 22:15:56 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-04-13 07:55:22 -0300 |
| commit | 8723e707c15f7b435f07f5d5ea693496bb9769bb (patch) | |
| tree | 60c88d9e8d41a1658d02b7588c5312f68d5523c9 /configure | |
| parent | 7228fe688cf14be49db8defaa609e45c1daa5c29 (diff) | |
test/smime: fix signature verification test with newer gmime.
The extra machinery to check for the actual output format is justified
by the possibility that distros may patch this newer output format
into older versions of gmime.
Amended-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Amended-again-by: db
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -589,6 +589,11 @@ int main () { validity = g_mime_certificate_get_id_validity (cert); if (validity != GMIME_VALIDITY_FULL) return !! fprintf (stderr, "Got validity %d, expected %d\n", validity, GMIME_VALIDITY_FULL); #endif +#ifdef CHECK_EMAIL + const char *email = g_mime_certificate_get_email (cert); + if (! email) return !! fprintf (stderr, "no email returned"); + if (email[0] == '<') return 2; +#endif return 0; } EOF @@ -622,6 +627,15 @@ EOF errors=$((errors + 1)) fi fi + printf "Checking whether GMime emits email addresses with angle brackets... " + if ${CC} -DCHECK_EMAIL ${CFLAGS} ${gmime_cflags} _check_gmime_cert.c ${gmime_ldflags} -o _check_email && + GNUPGHOME=${TEMP_GPG} ./_check_email; then + gmime_emits_angle_brackets=0 + printf "No.\n" + else + gmime_emits_angle_brackets=1 + printf "Yes.\n" + fi else printf 'No.\nFailed to set up gpgsm for testing X.509 certificate validity support.\n' errors=$((errors + 1)) @@ -1559,6 +1573,9 @@ NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK=${WITH_RETRY_LOCK} # Whether GMime can verify X.509 certificate validity NOTMUCH_GMIME_X509_CERT_VALIDITY=${gmime_x509_cert_validity} +# Whether GMime emits addresses with angle brackets (with <>) +NOTMUCH_GMIME_EMITS_ANGLE_BRACKETS=${gmime_emits_angle_brackets} + # Whether GMime can verify signatures when decrypting with a session key: NOTMUCH_GMIME_VERIFY_WITH_SESSION_KEY=${gmime_verify_with_session_key} |
