gpg --command-fd and gpg-agent
Werner Koch
wk at gnupg.org
Thu Dec 11 17:09:28 CET 2003
On Thu, 11 Dec 2003 10:06:49 -0500, Jeffrey Stedfast said:
> what I'd like to know is what is the appropriate way for me to deal with
> this? is there some sort of mesg I can watch for on the --status-fd? or
> is there a way for me to override their gpg-agent setting and just make
> it use my prompt instead?
Here is what you basically see if the agent is actually used:
[GNUPG:] USERID_HINT xxxxxxxxxxxxxxxx Foo Bar
[GNUPG:] NEED_PASSPHRASE ...
[GNUPG:] BAD_PASSPHRASE ...
Or if you enter the correct one:
[GNUPG:] USERID_HINT xxxxxxxxxxxxxxxx Foo Bar
[GNUPG:] NEED_PASSPHRASE ...
[GNUPG:] GOOD_PASSPHRASE
If there is a problem with the agent:
[GNUPG:] USERID_HINT xxxxxxxxxxxxxxxx Foo Bar
[GNUPG:] NEED_PASSPHRASE ....
gpg: can't connect to `/tmp/fffffff/SS': Connection refused
[GNUPG:] GET_HIDDEN passphrase.enter
which is the same as when you use --no-use-agent:
[GNUPG:] NEED_PASSPHRASE ...
[GNUPG:] GET_HIDDEN passphrase.enter
and you can send the passphrase via the command fd.
So, I'd suggest to grep for "GET_HIDDEN passphrase.enter" and display
a prompt using a text composed from the last NEED_PASSPHRASE and
USERID_HINT.
Will this work for you?
Werner
--
Werner Koch <wk at gnupg.org>
The GnuPG Experts http://g10code.com
Free Software Foundation Europe http://fsfeurope.org
More information about the Gnupg-devel
mailing list