Query the default key via command line?

Immanuel Scholz immanuel.scholz at tu-dresden.de
Thu Aug 30 14:08:32 CEST 2007


Hi,

I am writing an application that accesses the "gpg" executable. How do I
retrieve the current default key id via the command line?

I looked through the manpage and doc/DETAILS and looked up everything I
found by googling, but the only nasty way seem to parse some
~/.gnupg/gpg.conf file by hand and filter out the line
^default-key (.*)

This is nasty and does not work under non-linux ;). So is there an
option I didn't recognized to display the default key id (preferable the
full-id)?


Ciao, Imi.

-- 
DF0E A04F 7063 69C5 A76B  7557 0A77 608F 9172 3535



More information about the Gnupg-devel mailing list