Re: [PATCH] show s/mime keyid for successfully checked signatures
"Kevin J. McCarthy" <[email protected]> Thu, 2 Jul 2026 09:40:59 +0800
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <[email protected]> |
--jsspMy6Hnbu6QRu0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Jul 02, 2026 at 09:25:04AM +0800, Kevin J. McCarthy wrote:
>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=20
>curs_lib.c: it's too small and too specific. Instead make it a static=20
>function inside crypt-gpgme.c, just above the print_smime_keyinfo()=20
>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;
Also, we may need to be careful about key->fpr being NULL.
--=20
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
--jsspMy6Hnbu6QRu0
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmpFwasACgkQre92hIAx
a9rR7A/9GphSYpAAGZrf/y6UUCPGKqvdrA7i7j+4giEjZG27p0HcU6XzP2ap3Uhv
L7JYFCqENNIKBldsiMaDT8TXKLAJOAMf52qF1KHDCS0zJRIcz3pGb6MHEwDsI4vS
OLvyyjI0mdct6k1p0YDn/cTkgdNyrOW/A+/2PJ6lJRiOF79qvcBvbw2LWVvBzfPd
AroLpzPkLqeq5QZyy4ovP7fefhzh7D+cqPpkOGitpgRFCq4DtdzPdh42ySefCSwj
ZmAZIgSyjxZNaF+iR1UcaHkRIe6KFZdpgmj7v8uU0o99ROQViBHWhV/esu2iMPRz
7xpZUG59mSTaGbYrheLVU2JeUbkNOs+gXvsdu505BTP0PnnYFqU6X2dwT4aWiT8D
zNyiU9gzPt5SYsdxGeD+cKruCqNwAFWWnkQN13rGUDqQRdYbDtYUHGsBeSfsIR05
xTvrG5CUVSFz3U0mAvmhyekOl17+1B4YaH6ByhhN7xg1lELSC52yMfluRuMpPOPt
I/dDGGiyHgTL4fsu6aHLxV/0eyFDUC3l0uHW3D0pGEyqo6Am7FC7ffmcxazoYmHo
uV+RUcLCMlLYnAHOeQd2N98JTjRMSdXLvvsFFXonbvJbyhuP4QnCSDDRjFyt3FVg
wMui7fVR9B2inoFb5LQt8Rc5seHEtyKSH+WZv4giVkTgYV5Em/M=
=4IcT
-----END PGP SIGNATURE-----
--jsspMy6Hnbu6QRu0--