how do i get gnupg to read the passphrase from standard in
Tue Mar 26 00:14:01 2002
I need to have gnupgp read the passphrase as standard in.
I want to pipe a passphrase stored in a java BatchMail program into
gnupgp for encrypting files.
I want to do this directly by piping the passphrase into gpg standard
I cannot pass parameters into an echo because this is visible to ps. I
cannot store the passphrase in a file for security reasons.
Here's what I'm playing with right now:
encrypt.sh "firstname.lastname@example.org" "email@example.com" "filename"
where encrypt.sh is:
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?