PGP signing text from called from PHP
| From: | {R}ichard Ashton | Date: | Sat, 18 Jan 2003 22:53:27 +0000 |
| Subject: | PGP signing text from called from PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132128@lists.php.net to get a copy of this message | ||
Using PHP 4.1.2 I need to PGP sign a piece of text and detached the signature. I have
read a lot in the archives and and about the better exec() calls in 4.3.
However I cannot find a reference that indicates the best way to pass a set of
arguments out of a PHP script to PGP.
I need to use pgp2.6.3i the pgp command line looks like a bit this
pgp -sabf -u "pgpuser" "pgppassphrase" <"text"
>"pgpsignature"
This has to be given to the Bash Shell with whatever works exec() system() or
passthrough(), any output can be retrieved later .
It is possible, if anyone knows how, to set ENV variable in the shell to preload the
passphrase and the pgpuser into ENV variables.
Has anyone cracked this? Any pointers to archived messages I have missed.
Any suggestions at all would be most welcome.
{R}