Help with GPGME keylisting not listing signatures

Ingo Klöcker kloecker at kde.org
Mon Feb 1 22:35:48 CET 2021


On Samstag, 30. Januar 2021 00:22:11 CET John Scott via Gnupg-users wrote:
> On Saturday, January 23, 2021 10:39:30 AM EST Ingo Klöcker wrote:
> > Did you have a look at GPGME's tests as working example code? There is a
> > test for listing signatures:
> > https://dev.gnupg.org/source/gpgme/browse/master/tests/gpg/t-keylist-sig.c
> 
> Thanks, I didn't see that. Except for the difference that I read the keys
> from a gpgme_data_t connected to a stream instead of GnuPG's keyring, my
> code seems to match up with the test's way of doing things.
> 
> With the debugging information on the invocation of gpg doesn't look
> abnormal, and trying in a fresh chroot gets me the same results, so it
> seems as though getting detailed signature data from a gpgme_data_t may not
> be possible. My example for testing is at
> https://salsa.debian.org/-/snippets/519

You are using gpgme_op_keylist_from_data_start(). This effectively does
gpg --with-colons --with-fingerprint --import-options import-show --dry-run --import -- <keys.asc
(see https://dev.gnupg.org/source/gpgme/browse/master/src/engine-gpg.c;c8fd8870b3bf089f99156448b7d1e59c1150f994$3116)
which doesn't print any information on signatures.

You would need an additional --with-sig-check if GPGME_KEYLIST_MODE_SIGS is
set. Adding this to ​gpg_keylist_data() should be fairly easy.

Feel free to request this feature via https://dev.gnupg.org/, ideally
together with a patch.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20210201/5a8df4c7/attachment.sig>


More information about the Gnupg-users mailing list