Skip to content

Instantly share code, notes, and snippets.

View abeluck's full-sized avatar

Abel Luck abeluck

View GitHub Profile
@abeluck
abeluck / gpgme-iterating-keys.py
Created July 19, 2012 19:56
Python + gpgme snippets
import gpgme
# Loop through all keys in the default keyring
# Print the key id, the first uid, and all subkeys
# open context, defaults to ~/.gnupg afaik
ctx = gpgme.Context()
for key in ctx.keylist():
# looks like subkeys[0] is the master key