List all GPG/PGP keys of a local SKS key server

gpg

We have set up a local SKS keyserver in my company. It seems it is only possible to search keys (either for a name, email or keyid).

However, there are not so many users, so we would like to make the key repository browseable, that is being able to list all keys.

How would that be possible?

Best Answer

I gave up looking for this answer. I ended up writing a python script for this. It simply opens an http socket, send in this to the keyserver:

/pks/lookup?op=vindex&search=.com

which pulls down a listing of all the keys in the server. I then execute a findall on the email addresses, storing them in a set to weed out duplicates. Then I can loop through the email addresses, doing calls to the url

'/pks/lookup?op=vindex&search=%s&fingerprint=on&hash=on' % emailaddr

to get the fingerprints, ID, dates... whatever you want. I originally wrote the script to find duplicate email addresses and unused keys. I will likely mod the script to "preload" users keyring with all the keys in the keyserver automatically. After that, a simple call to gpg --refresh-keys should keep everybody happy.

Related Question