Query the default key via command line?
Werner Koch
wk at gnupg.org
Fri Aug 31 16:35:19 CEST 2007
On Fri, 31 Aug 2007 11:32, immanuel.scholz at tu-dresden.de said:
> This triggers any password agent, doesn't it?
For encryption you don't need the secret key and ghus there won't be a
passphrase prompt. With gpgsm it is a bit different as it will ask the
gpg-agent for the list of trusted root certifciates and that may -
depending on the configurration - trigger a Pinentry prompt.
> Really ugly, though... (and of course, the greps and cuts have to be
> done within the program to be usable under windows ;)
It is not that hard if you already have spawn and pipe functions ready.
gpgconf-comp.c has some code you could reuse.
> ~$ cat .gnupg/gpg.conf | grep ^default
> default-key 91723535
Ah right, my current gpg2 has this feature, whereas gpg 1.4.7 is missing
it. BTW, the supported options can be listed using
gpg --gpgconf-list
(gpgconf will only print options the backend programs announces)
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gnupg-devel
mailing list