Dialog between PGP and PGPe system utiltiy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian Tresman

    Dialog between PGP and PGPe system utiltiy

    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
    "Y":

    ---------------------------------------
    /usr/local/bin/pgpe -r orders@mykeynam e.com -o /home/ian/.pgp/tmp -a
    /home/ian/.pgp/data

    1024 bits, Key ID A487AD55, Created 2002-08-04
    "MyKeyName Orders <orders@mykeyna me.com>"

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

    MyKeyName Orders <orders@mykeyna me.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@mykeyna me.com"
    $pgp_config_fil es = "/home/ian/.pgp";

    $inputfile = $pgp_config_fil es . "/textfile.txt";
    $outputfile = $pgp_config_fil es . "/tmp";

    $pgp_command = "$pgp_path $pgp_options ";
    $pgp_command .= "$pgp_public_ke y_user_id ";
    $pgp_command .= "-o $outputfile -a";

    system("$pgp_co mmand $inputfile");
    ?>

    Can I get PHP to display and anwer the question generated by the
    command line utility pgpe?

    Regards,
    Ian Tresman
    Derby, UK
Working...