Order of keyserver results

Robert J. Hansen rjh at sixdemonbag.org
Fri Mar 24 22:43:18 CET 2006


While trying to write code to fetch keys from a keyserver automagically,
I ran across this case while doing testing.  Options were the standard
stuff for machine-readable output--fixed-list-mode and --with-colons.

			* * * * *

gpg: searching for "0xDEADBEEF" from hkp server
	random.sks.keyserver.penguin.de
info:1:5
pub:DEADBEEF:1:2048:933688385::
uid:Imad R. Faiad:933688385::
pub:DEADBEEF:17:1024:925285688::
uid:Imad R. Faiad:934573220::
uid:Preston Wilson <pres at domain-removed.com>:::
pub:DEADBEEF:1:384:1080720427::
pub:DEADBEEF:1:1024:812327879::
pub:DEADBEEF:17:1024:980061169::
uid:Imad R. Faiad:::
uid:Preston Wilson <pres at domain-removed.com>:993420630::

			* * * * *

My question here is... why are the UIDs and pub identifiers not
interleaved?  In all the other tests I ran, they came out neatly
interleaved, which made it easy to figure out which pub row was
associated with each uid row.

What's the proper way to parse this?  Should I just create two arrays,
one for pub and one for uid, store them as they come in and then assume
that pub[x] is associated with uid[x]?



More information about the Gnupg-devel mailing list