Re[2]: --passphrase-fd with a pipe handle under Win32
Maxim Masiutin
max@ritlabs.com
Sun Apr 22 14:00:01 2001
Hello Timo!
>> I found a workaround: to specify the passphrase via stdin,
>> delimiting the passphrase from data by LF character.
TS> Another solution would be to use the 'command-fd' switch.
Thank you for the hint! The problem, however, is in interprocess
communication under Win32. It seems that GnuPG is unable to read
from a pipe handle passed as a numeric value. Maybe that was because
mingw32 adds some unwanted wrappers to operations with handles? I
should continue the investigation. I took a look into GnuPG source
code but it seems to be all right there. I tried to download mingw32
to do see what's really happening inside GnuPG, but
ftp://ftp.openit.de gave me a timeout today. Should try again later.
I wrote a program that works with a modem under Win32 via COM-port
without using TAPI. This program runs external applications (e.g.
fax receiver) passing COM port handle to it as a numeric value in
the command line. I wonder why GnuPG doesn't work.
TS> Then all input from the keyboard is redirected to the file
TS> descriptor you specify for the command. For example:
TS> gpg --status-fd=2 --command-fd=23 -c foo
TS> Then all input would be read from fd 23 which was created by
TS> a pipe call. You've to watch for the 'status-fd' messages to
TS> send the correct strings.
It seems that it's all that is needed to integrate GnuPG into a MUA.
>> Did anyone spawn GnuPG under Win32?
TS> If you want a more elegant solution you should use GPGME.
Although there was written that "authors of MUAs should consider to
use GPGME", I found no API reference inside gpgme-0.2.1 archive. Is
there any reference exist?
I do not agree that the direct use of GnuPG from an application is
a complicated programming task, if there are no key management
functions in the application. It's very easy when it only comes to
encryption/signing/decryption/signature checking.
--
Maxim Masiutin
Vice President, Ritlabs S.R.L.
http://www.ritlabs.com/