--passphrase-fd with a pipe handle under Win32

Timo Schulz twoaday@freakmail.de
Sun Apr 22 10:49:01 2001


On Sun Apr 22 2001, Maxim Masiutin wrote:

Hi Maxim,


> I found a workaround: to specify the passphrase via stdin,
> delimiting the passphrase from data by LF character.
> --passphrase-fd 0 is using in that case. I don't like this solution
> much because the passphrase is mixed with data to be signed. It
> introduces the potential risk of passphrase to be exposed.
Another solution would be to use the 'command-fd' switch. Then all input from the keyboard is redirected to the file descriptor you specify for the command. For example: gpg --status-fd=2 --command-fd=23 -c foo Then all input would be read from fd 23 which was created by a pipe call. You've to watch for the 'status-fd' messages to send the correct strings. [GNUPG:] GET_HIDDEN passphrase.enter This is the string GnuPG will output if a passphrase is needed.
> Did anyone spawn GnuPG under Win32?
If you want a more elegant solution you should use GPGME. Timo -- Two-a-Day at WinPT.org keyid BF3DF9B4 http://www.WinPT.org