Re: [PATCH] show s/mime keyid for successfully checked signatures

"Kevin J. McCarthy" <[email protected]> Thu, 2 Jul 2026 15:15:12 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
--JUanmH7noI45p9r3
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
>>case for PGP that *also* prints the fingerprint.  I don't know if=20
>>it's okay to show the fingerprint twice, so that will need to be=20
>>looked at:
>>
>>     else if (!anybad && key && (key->protocol =3D=3D GPGME_PROTOCOL_Open=
PGP))
>>     { /* 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 =3D 1;
>
>Also, we may need to be careful about key->fpr being NULL.

The show_fingerprint() function is looking at key->subkeys->fpr, which=20
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, gpgm=
e_signature_t sig,
 =20
        aka =3D 1;
      }
+    show_fingerprint(key, s);
    }
    else
    {
@@ -1768,7 +1769,6 @@ static int show_one_sig_status(gpgme_ctx_t ctx, int i=
dx, 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 =3D 1;
        }

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

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

--JUanmH7noI45p9r3
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmpGEAAACgkQre92hIAx
a9qWWg/+PGDNuq47DZH2ks3VTLIkfE0s1CLdvYugrSavCZYp/uHw3ZLG30QbqcIi
ggWnVos/seLIInxz8LpFeVv/6U3kxsEfAjIIs2axaetLMckcmMTxSZbpEb/vrhHN
DDE+Sn74sNIFmYtnaA4t7X4hkn4IJUQ8E3OCbS/PY+c72LvH6E1iik5JpvJ/BTMJ
cBjlXIQ8HJ8syyEhUYUruVTSpf9KJLznXk13w5fK00L3E/PlbV+K5BEIfyBh44lW
XIjfbD1/8Ssl7pSEEhPJGT7HHGUThg0Q3UgXMRQxXRrHKiiuTQwgRNGICfj6nErr
s4/MpvSPeD6KpBoGpj7P0DoC7Xyjac6kjo07RkPJkld/7vq3Nbv4+nPV+hP6D0TE
l5u6TNw3SSOoSiXHK71rdi9GxepAiPi+lJoBz7BW60BozDuQL/uYm4us7lJ+j0Uk
77dutIozrTNf/5V5aGl7mnIl7t0namP9VhWPmPf0BR2KNki5vzkMyFgrALfQCL14
5fOZkF8mJyLTznOO43tonc1A9aqMlkba2iYZnKAdU26LhbTv6puxF0wbYhrKt6Fa
6eulce51NGZe79MoQKfLpx2MjYCqUDuu+VbT6dUGrxeO7B3jKcA27/877xmUw0lE
pR+AiopuOZBGdxPpD1J25jWottyqHnawNNjRz65p7xxne1rmGBU=
=bT5S
-----END PGP SIGNATURE-----

--JUanmH7noI45p9r3--