"--passphrase-fd n" not working

Michael H. Warfield mhw@wittsend.com
Tue Oct 2 19:29:01 2001


On Tue, Oct 02, 2001 at 12:35:23PM -0400, pd wrote:


> However, with your help and others I have found that both of the following
> work for me:

> gpg --decrypt -r george --passphrase-fd 0 <pass.txt encrypted.txt

> gpg --decrypt -r george --passphrase-fd 3 3<pass.txt encrypted.txt

> Is there any way to do this with pipes instead of an actual file? I have a
echo "Passphrase" | gpg --decrypt --passphrase-fd 0 encrypted.txt Or... Equivalent to previous file based command... cat pass.txt | gpg --decrypt --passphrase-fd 0 encrypted.txt
> number of encrypted texts encrypted with the same key. I'd like to have a
> perl program prompt for the passphrase once and decrypt the texts without
> storing it in a file on the hard drive.
This snippet of code is taken from a working perl script... ========================= open GPG, "|gpg --passphrase-fd 0 --quiet --no-tty -o msg.txt msg.asc > gpg.out 2> gpg.err"; print GPG "$KEY"; close GPG; =========================
> If I replace "pass.txt" with the password or with `echo password_text` it
> tells me it can't find the file by that name. Another basic Unix script
> problem I think - making a string look like file contents. There has to be
> a way to do it, I just haven't been able to come up with it yet. Any help
> would be appreciated.
Nope... You can't just replace the name of the file. You have to change to the pipe operator as well.
> Thanks,
>
> Paul
>
> >Hth,
> >
> > Werner
> >
> >
> >--
> >Werner Koch Omnis enim res, quae dando non deficit, dum habetur
> >g10 Code GmbH et non datur, nondum habetur, quomodo habenda est.
> >Privacy Solutions -- Augustinus
Mike -- Michael H. Warfield | (770) 985-6132 | mhw@WittsEnd.com (The Mad Wizard) | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!