how do i get gnupg to read the passphrase from standard in

Marc Mutz mutz@kde.org
Tue Mar 26 09:15:01 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 26 March 2002 00:09, Tom Strzemieczny wrote:
<snip>
> Here's what I'm playing with right now:
>
>  encrypt.sh "me@me.com" "recipient@recipient.com" "filename"
>
> where encrypt.sh is:
>
> #! /bin/sh
> gpg -s -e -o - --batch --passphrase-fd 0 --default-user $1 --yes
> --no-tty -r $2 $3  < -
>
> But i don't want gpg to hook into the standard out of my BatchMail
> program, but rather the standard out of the ScriptProcess that executed
> the command.   I think I am on the right track but don't have any
> difinitive answers yet.  Can someone please help?
<snip>

I don't understand this last paragraph in the light of what you wrote ear=
ier=20
(it seems to contradict the sentence "I want to do this directly by pipin=
g=20
the passphrase into gpg standard in [from BachMail]."), but you might wan=
t to=20
try and make the script "exec" gpg:

#!/bin/sh
exec gpg -seo ...

Marc

- --=20
Marc Mutz <mutz@kde.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8oCvU3oWD+L2/6DgRAhh+AKDTrq0hkqnZCrGSttyT6braHQdU2ACg8v00
M2fRaw4IE220Xx0osL52hAg=3D
=3DnhZg
-----END PGP SIGNATURE-----