On Wed, Jul 01, 2026 at 03:46:03PM +0200, Robert Jäschke 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 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: it's too small and too specific. Instead make it a static function inside crypt-gpgme.c, just above the print_smime_keyinfo() call.
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;
--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature
