Re: get id of key used for s/mime signature

Robert Jäschke via Mutt-users <[email protected]> Wed, 1 Jul 2026 15:44:36 +0200
Newsgroups gmane.mail.mutt.user
Message-ID <[email protected]>
--GUhh2sV75ZSuBYAC
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Dear Kevin,

Am 01.07.2026 schrieb Kevin J. McCarthy:
> > How can I see the id of a key used to sign a message in mutt?
>=20
> This was also left out of the GPGME code.  I'm not sure why, but I'll add=
 a
> TODO to put it into the signature block, if GPGME makes it available.

Thank you. As you've probably seen, I've submitted a patch to output the
keyid to mutt-devel. In gpgsm, the uid (subject) from gpgme_user_id_t is
not just printed but more readable information is extracted using
gpgsm_es_print_name.=C2=B2 I am sceptical whether it makes sense to re-use
that quite complex code. The key id itself is printed here:

log_info (_("               using %s key %s\n"), pkalgostr, pkfpr);

where pkalgostr and pkfpr are extracted using (again) quite elaborate
functions. So my brief patch might be enough for now (at least for me
;-).


Best,
Robert=20


=C2=B9 https://www.gnupg.org/documentation/manuals/gpgme/Key-objects.html#i=
ndex-gpgme_005fuser_005fid_005ft
=C2=B2 https://github.com/gpg/gnupg/blob/master/sm/verify.c#L715C11-L715C30
=C2=B3 https://github.com/gpg/gnupg/blob/master/sm/verify.c#L481

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

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

iQGzBAABCgAdFiEELJ15GEuwMYKw/FK7enZp3UrcWhkFAmpFGcIACgkQenZp3Urc
WhmDAAwAlBJNlfx2hzSSuDDuVN4xC60MwEXylCqhjNuCIMpRkMWd2GAIsJMnuejp
lS41Hu4j0qhN6Gdg+lv6NPoU8Suo0nmzY5duaZnihM6LTiLregjHYlm/9NmtjDxv
UMxSTM1EsYK/mJqPlSdfDu4g/HERjAkxQ7HnQumiALS0VluKkgsJkrtkrlsmJrBv
K0dzW60u0O17+hEKecVrPoH+qolRpeeqfRDTUbXN4A6lO5reWAkyIErBp7dyGjLW
Gb1631sRL5jDZFuSunj4Lb2b8jHJsKza2b7QOdHIQF4IPOYguM4jGc38h/QFBHHR
0AZOi+r0TZAnNljutxzThHXU+zB+ROcQc3bKrAnVLnE5DT0qgQVTNEJ3Qi3uGEgy
n3y02E3s3nD2A0vRkhGK21Sj+3iJkMF6C2KgvWKpeElCuRBQYFL7rr3/EqmrQvfm
KXo0dTnT/uObBy8dOQpQF7wMIu/xmqD/J9CfFx/s+e6G58WikLXU8noSc+/RYti7
DaT5i8tu
=3as0
-----END PGP SIGNATURE-----

--GUhh2sV75ZSuBYAC--