From 162ebc3b04164aee398d2641fadcd96bab8a4cf5 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 8 Apr 2004 09:53:01 +0000 Subject: [PATCH] * verify.c (_gpgme_verify_status_handler): Ignore the error status if we can't process it. * decrypt-verify.c (decrypt_verify_status_handler): Backed out yesterday's hack. It is not any longer required. --- gpgme/ChangeLog | 7 +++++++ gpgme/decrypt-verify.c | 9 --------- gpgme/decrypt.c | 3 +++ gpgme/gpgme.h | 2 +- gpgme/verify.c | 6 ++++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 9213a0b9..26c46308 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,10 @@ +2004-04-08 Werner Koch + + * verify.c (_gpgme_verify_status_handler): Ignore the error status + if we can't process it. + * decrypt-verify.c (decrypt_verify_status_handler): Backed out + yesterday's hack. It is not any longer required. + 2004-04-07 Werner Koch * decrypt-verify.c (decrypt_verify_status_handler): Hack to cope diff --git a/gpgme/decrypt-verify.c b/gpgme/decrypt-verify.c index 4ce72893..ef7f79b8 100644 --- a/gpgme/decrypt-verify.c +++ b/gpgme/decrypt-verify.c @@ -36,16 +36,7 @@ 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); - /* 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; } diff --git a/gpgme/decrypt.c b/gpgme/decrypt.c index 030073fa..1d106c13 100644 --- a/gpgme/decrypt.c +++ b/gpgme/decrypt.c @@ -104,6 +104,9 @@ _gpgme_decrypt_status_handler (void *priv, gpgme_status_code_t code, break; case GPGME_STATUS_ERROR: + /* Note that this is an informational status code which should + not lead to an erro retunr unless it is something not related + to the backend. */ { const char d_alg[] = "decrypt.algorithm"; const char u_alg[] = "Unsupported_Algorithm"; diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 13884a6e..5fd6858a 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -74,7 +74,7 @@ extern "C" { AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "0.4.6" +#define GPGME_VERSION "0.4.7-cvs" /* Some opaque data types used by GPGME. */ diff --git a/gpgme/verify.c b/gpgme/verify.c index afd5946f..a63a564f 100644 --- a/gpgme/verify.c +++ b/gpgme/verify.c @@ -1,6 +1,6 @@ /* verify.c - Signature verification. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH This file is part of GPGME. @@ -550,7 +550,9 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args) : gpg_error (GPG_ERR_INV_ENGINE); case GPGME_STATUS_ERROR: - return sig ? parse_error (sig, args) : gpg_error (GPG_ERR_INV_ENGINE); + /* The error status is informational, so we don't return an + error code if we are not ready to process this status. */ + return sig ? parse_error (sig, args) : 0; case GPGME_STATUS_EOF: if (sig && !opd->did_prepare_new_sig)