S
Susan Foster
I've been scanning several of the previous posts to this group, and
have tried several methods, but I have been unsuccessful in all my
attempts to be able to PGP encrypt a file from a .pl.
First try was by using PGPSimple - before I go any further, I'll
mention that I am running this program on a Linux box (shouldn't make
a difference, but thought I would say it to be complete). Anyway, I
basically took the CPAN man page example, set them with my settings,
and tried to encrypt. After many adjustments, I have had the program
run - but received no output. Below is what I have set (with
strategic changes for privacy, of course):
use Crypt:
GPSimple;
my $pgp_config_files = "~/.pgp";
my $pgp_version = "6.5.8";
my $pgp_path = "/usr/bin/pgp";
my $pgp_temp_file_path="/tmp/";
$ENV{"PGPPATH"} = $pgp_config_files;
my ($objPGP) = new Crypt:
GPSimple;
$objPGP->Version($pgp_version);
$objPGP->PgpExePath($pgp_path);
$objPGP->PgpKeyPath("$pgp_config_files");
$objPGP->PgpTempDir($pgp_temp_file_path);
my $pgp_public_key_user_id="blah\@blah.com";
my $output_file = "$outfile" . ".pgp";
my $plain_text_message = `cat $outfile`;
$objPGP->PublicKey($pgp_public_key_user_id);
$objPGP->PlainText($plain_text_message);
$objPGP->Encrypt;
my $encrypted_message = $objPGP->EncryptedText;
print "Message:$encrypted_message\n";
The program runs, but nothing comes out of the encryption - I don't
get anything at all.
I also tried an example from this group, which uses open2 - it seems
to use options that are not valid for my version of PGP, and I can't
figure out what are the comparable options in my version.
I hate to be vague - if I need to give more detail, please let me know
- I'd love to get any sort of help - I've been bashing my head over
this for 2 days!
Susan
have tried several methods, but I have been unsuccessful in all my
attempts to be able to PGP encrypt a file from a .pl.
First try was by using PGPSimple - before I go any further, I'll
mention that I am running this program on a Linux box (shouldn't make
a difference, but thought I would say it to be complete). Anyway, I
basically took the CPAN man page example, set them with my settings,
and tried to encrypt. After many adjustments, I have had the program
run - but received no output. Below is what I have set (with
strategic changes for privacy, of course):
use Crypt:
my $pgp_config_files = "~/.pgp";
my $pgp_version = "6.5.8";
my $pgp_path = "/usr/bin/pgp";
my $pgp_temp_file_path="/tmp/";
$ENV{"PGPPATH"} = $pgp_config_files;
my ($objPGP) = new Crypt:
$objPGP->Version($pgp_version);
$objPGP->PgpExePath($pgp_path);
$objPGP->PgpKeyPath("$pgp_config_files");
$objPGP->PgpTempDir($pgp_temp_file_path);
my $pgp_public_key_user_id="blah\@blah.com";
my $output_file = "$outfile" . ".pgp";
my $plain_text_message = `cat $outfile`;
$objPGP->PublicKey($pgp_public_key_user_id);
$objPGP->PlainText($plain_text_message);
$objPGP->Encrypt;
my $encrypted_message = $objPGP->EncryptedText;
print "Message:$encrypted_message\n";
The program runs, but nothing comes out of the encryption - I don't
get anything at all.
I also tried an example from this group, which uses open2 - it seems
to use options that are not valid for my version of PGP, and I can't
figure out what are the comparable options in my version.
I hate to be vague - if I need to give more detail, please let me know
- I'd love to get any sort of help - I've been bashing my head over
this for 2 days!
Susan