running gpg from another program

Matthias Urlichs smurf at noris.de
Thu Feb 4 05:43:40 CET 1999


Hi,

Chris Black:
> As for the passphrase, you have an option to specify a file descriptor to 
> read the passphrase from, but you say to avoid using this option if possible.
> So should I do some sort of chat/expect thing where I fork a gpg process, 
> wait for the passphrase prompt, and then have the user enter the passphrase 
> in a dialog and pass that to gpg's stdin?

Please don't do that. Reading the passphrase from its special file
descriptor may not be an ideal solution but it's certainly WAY better than
to do a send/expect kind of thing.

I think the main reason it's documented as not ideal is because you can
only read one passphrase that way -- but that can be fixed. Currently, gpg
reads the passphrase from the file descriptor once, right at startup. A
better idea would be to send a special message to the status FD whenever
gpg is waiting for a passphrase, and then read one line from the passphrase
FD. 

If Werner says he'd accept a patch for this, I'll implement it.

-- 
Matthias Urlichs  |  noris network GmbH   |   smurf at noris.de  |  ICQ: 20193661
The quote was selected randomly. Really.    |      http://www.noris.de/~smurf/
-- 
I wrote a song, but I can't read music so I don't know what it is. Every
once in a while I'll be listening to the radio and I say, "I think I might
have written that."
		-- Steve Wright




More information about the Gnupg-devel mailing list