On Thu, Jul 02, 2026 at 09:40:59AM +0800, Kevin J. McCarthy wrote:
Right now it looks like show_one_sig_status() has a special handling case for PGP that *also* prints the fingerprint. I don't know if it's okay to show the fingerprint twice, so that will need to be looked at:

    else if (!anybad && key && (key->protocol == GPGME_PROTOCOL_OpenPGP))
    { /* We can't decide (yellow) but this is a PGP key with a good
         signature, so we display what a PGP user expects: The name,
         fingerprint and the key validity (which is neither fully or
         ultimate). */
      print_smime_keyinfo(_("Good signature from:"), sig, key, s);
      show_one_sig_validity(ctx, idx, s);
      show_fingerprint(key,s);
      if (show_sig_summary(sum, ctx, key, idx, s, sig))
        anywarn = 1;

Also, we may need to be careful about key->fpr being NULL.

The show_fingerprint() function is looking at key->subkeys->fpr, which is supposed to usually be the same as key->fpr.

Does something like this work for you in you in your S/MIME tests:

@@ -1646,6 +1646,7 @@ static void print_smime_keyinfo(const char *msg, 
gpgme_signature_t sig,
aka = 1;
     }
+    show_fingerprint(key, s);
   }
   else
   {
@@ -1768,7 +1769,6 @@ static int show_one_sig_status(gpgme_ctx_t ctx, int idx, 
STATE *s)
            ultimate). */
         print_smime_keyinfo(_("Good signature from:"), sig, key, s);
         show_one_sig_validity(ctx, idx, s);
-        show_fingerprint(key,s);
         if (show_sig_summary(sum, ctx, key, idx, s, sig))
           anywarn = 1;
       }

That is, just moving the "show_fingerprint() call out from the OpenPGP "yellow" special case and into print_smime_keyinfo? I'm just curious.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to