bad passphrase error passing it into GPG on Windows 98 using stdin

Leigh S. Jones, KR6X kr6x@kr6x.com
Wed Jun 26 22:33:01 2002


This is the wrong way to use --passphrase-fd.  Even
if you're using Linux, the option:

--passphrase-fd 0

tells gpg that the actual passphrase will be passed into
the gpg program through a pipe to port zero; here
"passwordfile.txt" would have to be the actual passphrase
rather than the name of the file containing the passphrase.

And that's not necessarily the only problem.  Under
Windows with the Ming/W32 versions the file descriptor
"0" might not work as expected.  I'm not sure of this,
mind you, but it might be necessary to convert the
file descriptor 0 to an OSF file handle before passing it.
Perhaps that would be zero too.  Anyone know for sure?

----- Original Message -----
From: "Clough, Samuel" <Samuel_Clough@invesco.com>
To: <gnugpghelp@mlhp.net>
Cc: <gnupg-users@gnupg.org>
Sent: Wednesday, June 26, 2002 12:30
Subject: RE: bad passphrase error passing it into GPG on Windows 98 using
stdin


> My Isn't this popular lately !  I have had the same issue.
> I had tried a similar version of what you are doing using pipes and could
> not get it to work.
> One not so great work around is to write the password to a temporary file,
> and then do the following:
>
> c:\gnupg\gpg --passphrase-fd 0 -o outputfile.exe --decrypt
c:\decrypted.txt
> < passwordfile.txt
>
> That works with a create process api, but will probably give you errors
with
> pipes.  Try it though and see.  It has trouble with the redirect.
> The code above is the best way I know to do it without C code.
>
> I used the above code with the createprocess api and rolled all that into
a
> com component and I just reference the dll.  It always checks for an
output
> file to make sure it actually worked.
>
>
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>