[gmime] Fixed gpg signature verification when no key is available
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Fixed gpg signature verification when no key is available
- Date: Fri, 17 Feb 2012 15:04:55 +0000 (UTC)
commit 5276c8547259ee225e5955c9df011ff52ad79138
Author: Jeffrey Stedfast <fejj gnome org>
Date: Fri Feb 17 10:04:04 2012 -0500
Fixed gpg signature verification when no key is available
2012-02-17 Jeffrey Stedfast <fejj gnome org>
* gmime/gmime-gpg-context.c (gpg_verify): In cases where gpg
* does
not exit with code 0, only set the GError when we've gotten no
signer information from gpg (otherwise we return the list of
signers, which will presumably include why the verification
failed
in the status of each signer). Fixes bug #668085.
ChangeLog | 8 ++++++++
gmime/gmime-crypto-context.c | 2 +-
gmime/gmime-gpg-context.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d368c2e..cefea58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-02-17 Jeffrey Stedfast <fejj gnome org>
+ * gmime/gmime-gpg-context.c (gpg_verify): In cases where gpg does
+ not exit with code 0, only set the GError when we've gotten no
+ signer information from gpg (otherwise we return the list of
+ signers, which will presumably include why the verification failed
+ in the status of each signer). Fixes bug #668085.
+
+2012-02-17 Jeffrey Stedfast <fejj gnome org>
+
* gmime/gmime-part-iter.c: Fixed to behave the same as IMAP and
also to actually work.
diff --git a/gmime/gmime-crypto-context.c b/gmime/gmime-crypto-context.c
index 1c14d43..537a063 100644
--- a/gmime/gmime-crypto-context.c
+++ b/gmime/gmime-crypto-context.c
@@ -360,7 +360,7 @@ crypto_verify (GMimeCryptoContext *ctx, GMimeDigestAlgo digest, GMimeStream *ist
* verify the integirity of the @istream.
*
* Returns: a #GMimeSignatureList object containing the status of each
- * signature.
+ * signature or %NULL on error.
**/
GMimeSignatureList *
g_mime_crypto_context_verify (GMimeCryptoContext *ctx, GMimeDigestAlgo digest, GMimeStream *istream,
diff --git a/gmime/gmime-gpg-context.c b/gmime/gmime-gpg-context.c
index 439b023..411a23b 100644
--- a/gmime/gmime-gpg-context.c
+++ b/gmime/gmime-gpg-context.c
@@ -1898,7 +1898,8 @@ gpg_verify (GMimeCryptoContext *context, GMimeDigestAlgo digest,
}
}
- if (gpg_ctx_op_wait (gpg) != 0) {
+ /* Only set the GError if we got no signature information from gpg */
+ if (gpg_ctx_op_wait (gpg) != 0 && !gpg->signatures) {
const char *diagnostics;
int save;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]