From: Colin Leroy Date: Tue, 27 Sep 2005 22:19:15 +0000 (+0000) Subject: 2005-09-27 [colin] 1.9.14cvs58 X-Git-Tag: rel_1_9_15~11 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e34b316e7e92fffce465417b67e736b4bbea14fb;ds=sidebyside 2005-09-27 [colin] 1.9.14cvs58 * src/plugins/pgpcore/sgpgme.c Report error when there's one, instead of "Signature unchecked" --- diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index f74a7c21e..7206d046d 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,9 @@ +2005-09-27 [colin] 1.9.14cvs58 + + * src/plugins/pgpcore/sgpgme.c + Report error when there's one, instead of + "Signature unchecked" + 2005-09-27 [colin] 1.9.14cvs57 * src/prefs_quote.c diff --git a/PATCHSETS b/PATCHSETS index 5721e93d8..16d458571 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -826,3 +826,4 @@ ( cvs diff -u -r 1.9.2.28 -r 1.9.2.29 src/gtk/gtkaspell.c; ) > 1.9.14cvs55.patchset ( cvs diff -u -r 1.65.2.39 -r 1.65.2.40 src/codeconv.c; cvs diff -u -r 1.382.2.176 -r 1.382.2.177 src/compose.c; cvs diff -u -r 1.50.2.13 -r 1.50.2.14 src/compose.h; ) > 1.9.14cvs56.patchset ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/prefs_quote.c; ) > 1.9.14cvs57.patchset +( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/plugins/pgpcore/sgpgme.c; ) > 1.9.14cvs58.patchset diff --git a/configure.ac b/configure.ac index 1647efc90..9eebe87ff 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=14 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=57 +EXTRA_VERSION=58 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index 61e19915a..e9f5a208a 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -54,7 +54,8 @@ gpgme_verify_result_t sgpgme_verify_signature(gpgme_ctx_t ctx, gpgme_data_t sig, if ((err = gpgme_op_verify(ctx, sig, plain, dummy)) != GPG_ERR_NO_ERROR) { debug_print("op_verify err %s\n", gpgme_strerror(err)); - return NULL; + return GINT_TO_POINTER(-GPG_ERR_SYSTEM_ERROR); + } status = gpgme_op_verify_result(ctx); @@ -66,16 +67,24 @@ SignatureStatus sgpgme_sigstat_gpgme_to_privacy(gpgme_ctx_t ctx, gpgme_verify_re unsigned long validity = 0; gpgme_signature_t sig = NULL; - if (status == NULL) - return SIGNATURE_UNCHECKED; + if (GPOINTER_TO_INT(status) == -GPG_ERR_SYSTEM_ERROR) { + debug_print("system error\n"); + return SIGNATURE_CHECK_FAILED; + } + if (status == NULL) { + debug_print("status == NULL\n"); + return SIGNATURE_UNCHECKED; + } sig = status->signatures; - if (sig == NULL) + if (sig == NULL) { + debug_print("sig == NULL\n"); return SIGNATURE_UNCHECKED; - + } validity = sig->validity; + debug_print("err code %d\n", gpg_err_code(sig->status)); switch (gpg_err_code(sig->status)) { case GPG_ERR_NO_ERROR: if ((validity != GPGME_VALIDITY_MARGINAL) && @@ -122,6 +131,10 @@ gchar *sgpgme_sigstat_info_short(gpgme_ctx_t ctx, gpgme_verify_result_t status) gchar *uname = NULL; gpgme_key_t key; + if (GPOINTER_TO_INT(status) == -GPG_ERR_SYSTEM_ERROR) { + return g_strdup(_("The signature can't be checked - GPG error.")); + } + if (status == NULL) { return g_strdup(_("The signature has not been checked.")); }