Can I get PHP to display and anwer a questions generated by the command
line utility pgpe?
I'm using pgpe on a Unix box to create PGP encrypted messages. But the
first time I use pgpe with a new PGP keyname, it asks whether I trust
the key, and I have to run pgpe at the command line in order to answer
"Y":
/usr/local/bin/pgpe -r orders@mykeyname.com -o /home/ian/.pgp/tmp -a /home/ian/.pgp/data
1024 bits, Key ID A487AD55, Created 2002-08-04
"MyKeyName Orders <orders@mykeyname.com>"
WARNING: The above key is not trusted to belong to:
MyKeyName Orders <orders@mykeyname.com>
Do you want to use the key with this name? [y/N] y
The first time PHP accesses pgpe with a new keyname, it hangs because
I don't see the message above, and I am unable to pass on an
acknowledgement:
<?
$pgp_path = "/usr/local/bin/pgpe";
$pgp_options = "-r";
$pgp_public_key_user_id = "orders@mykeyname.com"
$pgp_config_files = "/home/ian/.pgp";
$inputfile = $pgp_config_files . "/textfile.txt";
$outputfile = $pgp_config_files . "/tmp";
$pgp_command = "$pgp_path $pgp_options ";
$pgp_command .= "$pgp_public_key_user_id ";
$pgp_command .= "-o $outputfile -a";
system("$pgp_command $inputfile");
?>
Can I get PHP to display and anwer the question generated by the
command line utility pgpe?
Regards,
Ian Tresman
Derby, UK