Show full key/signature fingerprints.
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 8 Nov 2017 23:31:27 +0000 (00:31 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 8 Nov 2017 23:31:27 +0000 (00:31 +0100)
Closes bug 3910 - Displaying of problematic short key IDs for GPG messages

src/plugins/pgpcore/pgp_viewer.c
src/plugins/pgpcore/sgpgme.c

index 99b6206..102b886 100644 (file)
@@ -278,7 +278,7 @@ static void pgpview_show_mime_part(TextView *textview, MimeInfo *partinfo)
                return;
        } else {
                TEXTVIEW_INSERT(_("\n  Key ID "));
-               TEXTVIEW_INSERT(sig->fpr);
+               TEXTVIEW_INSERT(key->fpr);
                TEXTVIEW_INSERT(":\n\n");
                TEXTVIEW_INSERT(_("   This key is in your keyring.\n"));
        }
index 89b4c87..11bd25b 100644 (file)
@@ -281,9 +281,7 @@ gchar *sgpgme_sigstat_info_short(gpgme_ctx_t ctx, gpgme_verify_result_t status)
                        if (key) {
                                result = g_strdup_printf(_("Good signature from \"%s\""), uname);
                        } else {
-                               gchar *id = g_strdup(sig->fpr + strlen(sig->fpr)-8);
-                               result = g_strdup_printf(_("Key 0x%s not available to verify this signature"), id);
-                               g_free(id);
+                               result = g_strdup_printf(_("Key 0x%s not available to verify this signature"), sig->fpr);
                        }
                        break;
                }
@@ -301,9 +299,7 @@ gchar *sgpgme_sigstat_info_short(gpgme_ctx_t ctx, gpgme_verify_result_t status)
                result = g_strdup_printf(_("Bad signature from \"%s\""), uname);
                break;
        case GPG_ERR_NO_PUBKEY: {
-               gchar *id = g_strdup(sig->fpr + strlen(sig->fpr)-8);
-               result = g_strdup_printf(_("Key 0x%s not available to verify this signature"), id);
-               g_free(id);
+               result = g_strdup_printf(_("Key 0x%s not available to verify this signature"), sig->fpr);
                break;
                }
        default: