Signing Files with PGP
| From: | J.Mueller, pro.vider.de GmbH | Date: | Thu, 20 Dec 2001 09:15:29 +0000 |
| Subject: | Signing Files with PGP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78305@lists.php.net to get a copy of this message | ||
Hello List,
I try to setup a script which automatically
signs a file with PGP.
With the system command this looks like that:
% /usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt
A private key is required to make a signature.
Need a pass phrase to decrypt private key:
1024 bits, Key ID F593ED45, Created 2001-12-14
"Juergen Mueller <j.mueller@pro.vider.de>"
Enter pass phrase:
Pass phrase is good.
Creating output file test1.sig
%
Now the thing is how can I implement the pass phrase into
PHP so that the command is being done?
When I use something like
$command="/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt";
exec("$command",$answer);
obviously nothing is happening cause the pass phrase was
not given.
Thanks.
Juergen