By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,767 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Dialog between PGP and PGPe system utiltiy

P: n/a
Can I get PHP to display and anwer a questions generated by a 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

/usr/local/bin/pgpe -r or**** -o /home/ian/.pgp/tmp -a

1024 bits, Key ID A487AD55, Created 2002-08-04
"MyKeyName Orders <or****>"

WARNING: The above key is not trusted to belong to:

MyKeyName Orders <or****>

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

$pgp_path = "/usr/local/bin/pgpe";
$pgp_options = "-r";
$pgp_public_key_user_id = "or****"
$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?

Ian Tresman
Derby, UK
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.