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

"Kevin J. McCarthy" <[email protected]> Thu, 2 Jul 2026 09:25:04 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
--zh4Sl7IgHzGXVwtM
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 01, 2026 at 03:46:03PM +0200, Robert J=C3=A4schke via Mutt-dev =
wrote:
>with respect to my post "get id of key used for s/mime signature" on the
>mutt-users list, I have written a brief patch to show the key id. To
>reduce code duplication, I added a function mutt_align to curs_lib.c,
>but I am not sure whether that's the best place to go. I hope my aged C
>skills have not introduced too many errors, so feedback is very welcome.

Thank you for taking the time to write a patch.  This is just a brief=20
review right now, because I'm short on time.

The helper function is a good idea.  But it should not be in curs_lib.c:=20
it's too small and too specific.  Instead make it a static function=20
inside crypt-gpgme.c, just above the print_smime_keyinfo() call.

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 it's=20
okay to show the fingerprint twice, so that will need to be 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;

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

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

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

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmpFvfAACgkQre92hIAx
a9ogLg/+P5plpNaRHnB8yAazRYK5RHXrrE6ilcRq2s5Ze+FohdZXJoPmM9PcqgnG
hM6u3cKBrxJkRTt5xZBGGj3y9CFajRCpAW61EIfn/vDuzjqJCZgugsOcyuMi5/nm
p44eSTriNpfphopI/2tTDRKGER5BW/ioHGj9hVJ2NL4dh93orJBy93uHecSdyXWF
7pYAmEr69OJcd/93JDpxs1/pGlIgQm+xK1buKHFxVwqojz4Q+kn0nMlufqfXMZU2
HU/tR5wb83c0TJkM97BdYMjVnRauLWBo/+keNpSYzDtbKRSUZR00C8l54tlMc388
p38g+34kqJU6NzvfbJ00Ua/sthfxErdPrLdmOwFjcohmeTTodS2bEh3CrMHR1ZOX
ML5CPP0iCA/+0WzbZskDEJkI32jqgHslYVCXqefkUXuxyQt46JE6Z+NpcCvapKeH
0nUouo1TFaRy+IaWFcoS1eFU4iwjBEbAIx9klHQZsMDCjhDfKhF3lkAdWnl8eEI4
Y70M5HuOygbPrSOCyr8/UlR0qtOWzRP2wq1mkNWKp3J/2nV+GAaf/uCtBdkFo60Y
NhtVCQDoSr8rUN5peHhW8ZMNeX/eSnJeE1z+shxR+ZAVA63kcyVSR49lDxIi3Wo/
a1b23Axt1Wqw1gBUpvMAIDAlxz/kqw3DL4pwLpfcG5I7EPF0f34=
=02mG
-----END PGP SIGNATURE-----

--zh4Sl7IgHzGXVwtM--