This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder