diff options
author | Ingo Klöcker <[email protected]> | 2024-05-15 09:53:06 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2024-05-15 09:53:06 +0000 |
commit | a73a41109fff3b6d3f81fa29d353419ae45f6dda (patch) | |
tree | 56224942046884ab55e4393812f5188c1ddad8e2 /tests | |
parent | doc: Update use of Autoconf with PKG_CHECK_MODULES. (diff) | |
download | gpgme-a73a41109fff3b6d3f81fa29d353419ae45f6dda.tar.gz gpgme-a73a41109fff3b6d3f81fa29d353419ae45f6dda.zip |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gpg/t-verify.c | 13 |
1 files 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); |