2011-01-06 [paul] 3.7.8cvs27
authorPaul Mangan <paul@claws-mail.org>
Thu, 6 Jan 2011 09:23:59 +0000 (09:23 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 6 Jan 2011 09:23:59 +0000 (09:23 +0000)
* src/plugins/pgpcore/sgpgme.c
fix bug #2322, 'GPG Full info: showing subkey
ID instead of primary key fingerprint'
Patch by Sébastien Bigaret.

ChangeLog
PATCHSETS
configure.ac
src/plugins/pgpcore/sgpgme.c

index 2704f2f..1a192ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-06 [paul]      3.7.8cvs27
+
+       * src/plugins/pgpcore/sgpgme.c
+               fix bug #2322, 'GPG Full info: showing subkey
+               ID instead of primary key fingerprint'
+               Patch by Sébastien Bigaret.
+
 2011-01-03 [colin]     3.7.8cvs26
 
        * src/unmime.c
index 45e201f..e661760 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.47.2.51 -r 1.47.2.52 src/procheader.c;  ) > 3.7.8cvs24.patchset
 ( cvs diff -u -r 1.8.2.14 -r 1.8.2.15 src/unmime.c;  ) > 3.7.8cvs25.patchset
 ( cvs diff -u -r 1.8.2.15 -r 1.8.2.16 src/unmime.c;  ) > 3.7.8cvs26.patchset
+( cvs diff -u -r 1.1.2.66 -r 1.1.2.67 src/plugins/pgpcore/sgpgme.c;  ) > 3.7.8cvs27.patchset
index 764003b..7a37387 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=26
+EXTRA_VERSION=27
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 3a3b781..46a4655 100644 (file)
@@ -327,8 +327,21 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status)
                                user = user->next;
                        }
                        g_string_append_printf(siginfo,
-                               _("Primary key fingerprint: %s\n"), 
-                               sig ? sig->fpr: "?");
+                               _("Primary key fingerprint:"));
+                       const char* primary_fpr = NULL;
+                       if (key && key->subkeys && key->subkeys->fpr)
+                               primary_fpr = key->subkeys->fpr;
+                       else
+                               g_string_append(siginfo, " ?");
+                       int idx; /* now pretty-print the fingerprint */
+                       for (idx=0; primary_fpr && *primary_fpr!='\0'; idx++, primary_fpr++) {
+                               if (idx%4==0)
+                                       g_string_append_c(siginfo, ' ');
+                               if (idx%20==0)
+                                       g_string_append_c(siginfo, ' ');
+                               g_string_append_c(siginfo, (gchar)*primary_fpr);
+                       }
+                       g_string_append_c(siginfo, '\n');
 #ifdef HAVE_GPGME_PKA_TRUST
                         if (sig->pka_trust == 1 && sig->pka_address) {
                                 g_string_append_printf(siginfo,