Page MenuHome GnuPG

GPGME does not parse key id from keyserver when longer than 8 digits
Closed, ResolvedPublic

Description

When performing a keylist with GPGME_KEYLIST_MODE_EXTERN, if the keyserver returns
a key id that is greater than 8 digits, the key id will be blank.

The draft of "HTTP Keyserver Protocol" states in section 5.2:

http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-5.2

---

<keyid> = this is either the fingerprint or the key ID of the
          key.  Either the 16-digit or 8-digit key IDs are
          acceptable, but obviously the fingerprint is best.  A
          keyserver should use the most specific of the key IDs
          that it has available.  Since it is not possible to
          calculate the key ID from a V3 key fingerprint, for V3
          keys this should be either the 16-digit or 8-digit
          key ID only

I have narrowed down the cause to this line:

https://gitorious.org/gnupg-org/gpgme/source/86260b47c9e306e325103d1af767842357647
e60:src/keylist.c#L553

Attached is a simple patch that works around the issue, albeit, in a not very well
tested or overly informed fashion - so it may need some reform.

Patch is against HEAD of master.

Details

Version
1.5.0

Event Timeline

aheinecke claimed this task.

I've overlooked your bugreport and opened a very similar one
T1685

Werner has commited a proper fix for this in gpgme master.

Thanks for the report anyway. If I had seen this earlier it would have saved me
some time debugging this and coming to the same conclusion ;-)