From 4999b4365734333db86f11adb60875418c8352c7 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 7 Apr 2004 16:17:27 +0000 Subject: [PATCH] (decrypt_verify_status_handler): Hack to cope with meaningless error codes from the verify status function. --- trunk/gpgme/ChangeLog | 5 +++++ trunk/gpgme/decrypt-verify.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index d7fc125..9213a0b 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,8 @@ +2004-04-07 Werner Koch + + * decrypt-verify.c (decrypt_verify_status_handler): Hack to cope + with meaningless error codes from the verify status function. + 2004-04-05 Werner Koch * gpgme.h: Add GPGME_STATUS_NEWSIG. diff --git a/trunk/gpgme/decrypt-verify.c b/trunk/gpgme/decrypt-verify.c index 40818bf..4ce7289 100644 --- a/trunk/gpgme/decrypt-verify.c +++ b/trunk/gpgme/decrypt-verify.c @@ -36,7 +36,16 @@ decrypt_verify_status_handler (void *priv, gpgme_status_code_t code, if (!err) err = _gpgme_decrypt_status_handler (priv, code, args); if (!err) - err = _gpgme_verify_status_handler (priv, code, args); + { + err = _gpgme_verify_status_handler (priv, code, args); + /* The verify status handler might not be in the state to verify + a signature, either because there is no signature or we are + currently processing the encrytion layer, and thus it will + likely return "invalid engine" - we have to ignore it + therefore. */ + if (gpg_err_code (err) == GPG_ERR_INV_ENGINE) + err = 0; + } return err; } -- 2.26.2