aboutsummaryrefslogtreecommitdiffstats
path: root/src/verify.c
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2026-07-09 16:34:06 +0200
committerIngo Klöcker <[email protected]>2026-07-09 16:35:58 +0200
commit4cb1906c1c47ce2c8b7180bc31ffdb1af4b5ffe8 (patch)
tree6510969d005bace16cb10f8e3f6c6924e361f797 /src/verify.c
parentPost release updates (diff)
downloadgpgme-4cb1906c1c47ce2c8b7180bc31ffdb1af4b5ffe8.tar.gz
gpgme-4cb1906c1c47ce2c8b7180bc31ffdb1af4b5ffe8.zip
Ignore TRUST_ status lines if no NEWSIG was seen
* src/verify.c (_gpgme_verify_status_handler): Don't return error if TRUST_* status line is seen before NEWSIG status line has been seen. -- Since recently, in de-vs compliance mode, gpgsm emits TRUST_ status lines during decryption if the validation of the encryption certificate fails. Consequently, it's not an error if a TRUST_ status line is seen without having seen a NEWSIG status line before. GnuPG-bug-id: 8333
Diffstat (limited to 'src/verify.c')
-rw-r--r--src/verify.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/verify.c b/src/verify.c
index 19ac5d71..7ae18cb8 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -996,9 +996,14 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
case GPGME_STATUS_TRUST_MARGINAL:
case GPGME_STATUS_TRUST_FULLY:
case GPGME_STATUS_TRUST_ULTIMATE:
+ /* In de-vs compliance mode TRUST_ status is emitted during
+ * decryption if validation of the encryption certificate
+ * fails. Silently, ignore such a status line if no NEWSIG
+ * was seen. */
+ if (!sig)
+ break;
opd->only_newsig_seen = 0;
- return sig ? parse_trust (sig, code, args)
- : trace_gpg_error (GPG_ERR_INV_ENGINE);
+ return parse_trust (sig, code, args);
case GPGME_STATUS_PKA_TRUST_BAD:
case GPGME_STATUS_PKA_TRUST_GOOD: