passphrase-fd $msg & $pass from command line?
Hack Hawk
hh@hackhawk.net
Tue Mar 4 04:35:02 2003
Hello,
Please forgive me for discussing a topic already discussed in the archives,
but I can't seem to find the "very specific" answer I'm looking for.
I'm writing a PHP script to --clearsign a message.
1) I've found out how to clearsign text passed on the command line.
$msg = "my message";
$cmd = "echo '$msg' | gpg --clearsign --passphrase-fd 2 2<pass.txt";
exec($cmd,$encr,$err);
2) I've found out how to clearsign a file, with the password sent on the
command line. Not sure if the syntax is exactly correct cause I already
overwrote this one.
$cmd = "echo PASS | gpg --clearsign --passphrase-fd 0 msg.txt";
exec($cmd,$outp,$err);
But what I'm failing to find is a way to pass BOTH the message AND the
password on the command line without using any files at all. Is this even
possible, or am I just dreaming?
Best Regards
- hawk