Q: gpgme_op_keylist_*() on key server

Albrecht Dreß albrecht.dress at arcor.de
Sun May 7 13:48:12 CEST 2017


Hi all,

I have a question about using the gpgme_op_keylist_*() functions for listing keys on an external key server.

When I run the attached simple C code to look up a certain key in the local key ring, the gpgme_key_t fields (revoked, expired, etc.) are filled as expected:

albrecht at deneb:~$ ./gpgme-list-test wk at gnupg.org
searching for 'wk at gnupg.org' in local key ring
5DE249965B0358A2: Werner Koch <wk at gnupg.org> [sign][] .E..
F2AD85AC1E42B367: Werner Koch <wk at gnupg.org> [sign][encr] ....

However, looking up the same key on the key server, all keys seem to be unusable as none of them has the can_sign or can_encrypt flag set:

albrecht at deneb:~$ ./gpgme-list-test wk at gnupg.org e
searching for 'wk at gnupg.org' on key servers
6FC4ECF01E42B367: Werner Koch <wk at gnupg.org> [][] R...
2F7998F3DBFC6AD9: Werner Koch <wk at gnupg.org> [][] ....
F2AD85AC1E42B367: Werner Koch <wk at gnupg.org> [][] ....
5DE249965B0358A2: Werner Koch <> [][] ....
6C7EE1B8621CC013: Werner Koch <wk at gnupg.org> [][] ....

I also noticed that the 'expired' flag is missing for 5DE249965B0358A2, although I ran 'gpg2 --refresh-keys' before.

Any idea what I am missing here?

Thanks in advance,
Albrecht.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpgme-list-test.c
Type: text/x-csrc
Size: 1534 bytes
Desc: not available
URL: </pipermail/attachments/20170507/5599b9d8/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: </pipermail/attachments/20170507/5599b9d8/attachment-0001.sig>


More information about the Gnupg-devel mailing list