From a73a41109fff3b6d3f81fa29d353419ae45f6dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Wed, 15 May 2024 11:53:06 +0200 Subject: [PATCH] tests: Fix test after changed behavior of gpgme_op_verify * tests/gpg/t-verify.c (main): Change assertion of test. -- The change introduced with 1dc44b7c makes gpg abort the verification of a clear-signed message if it encounters garbage following the signed data. We have to adapt the test to this change. GnuPG-bug-id: 6907 --- tests/gpg/t-verify.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/gpg/t-verify.c b/tests/gpg/t-verify.c index 84afa9a3..66f4c337 100644 --- a/tests/gpg/t-verify.c +++ b/tests/gpg/t-verify.c @@ -409,12 +409,13 @@ main (int argc, char *argv[]) err = gpgme_data_new (&text); fail_if_err (err); err = gpgme_op_verify (ctx, sig, NULL, text); - fail_if_err (err); - result = gpgme_op_verify_result (ctx); - check_result (result, 1, 0, GPGME_SIGSUM_KEY_MISSING, - "D0C16E12A3A5E7857F6FC1D30F5BE42A23C91CE3", - GPG_ERR_NO_PUBKEY, 0, GPGME_VALIDITY_UNKNOWN); - check_data (text, "bar\n"); + if (gpgme_err_code (err) != GPG_ERR_BAD_DATA) + { + fprintf (stderr, "%s:%i: " + "Garbage following clear-signed message not detected\n", + PGM, __LINE__); + exit (1); + } gpgme_data_release (sig); gpgme_data_release (text);