misoldgit wrote:
Hi,

I have a program that uses Crypt::OpenPGP to encrypt and decrypt files
on our company server. I need to pp the program to create a .exe as I
do not want Perl installed on the server. I have written the program
and it works fine on a test workstation in native Perl but fails when
'Parl'ed using pp.bat.

I've recreated the core of the program and can re-create the problem.

The following program works fine when run in native Perl but fails
with a 'No known recipients for encryption' error when the 'pp'ed .exe
file is run.

The program refers to 'pubring.gpg' which is a GPG-compliant keyring
file containing a valid public key for [EMAIL PROTECTED] This was
created using the GPG program.

Am I missing something (it has been known) or is there a bug here?

Perl is ActiveState version 5.8.8.817
used 'ppm' to install PAR-588 version 0.959

Incidently, after upgrading PAR-588 to the latest version I could get,
I had to individually install Getopt-ArgvFile [1.09] to get pp to run
without errors

TIA,

Program is:
#!/bin/perl -w

# test encryption script

use Crypt::OpenPGP;

my ($infile, $result, $outfile, $temp);

my $pgp = Crypt::OpenPGP->new(  Compat       =>   "GnuPG",
        SecRing =>   "secring.gpg",                                PubRing =>   
"pubring.gpg",
        );
if (defined($pgp)) {
        print "\$pgp created OK\n\n";
} else {
        print "\$pgp not created for some reason\n\n";
}

if (-e 'pubring.gpg') {
        print "pubring.gpg exists OK\n";
}

print "Input file to be encrypted: ";
$infile = <STDIN>;
chomp $infile;

$result = $pgp->encrypt(     Filename        =>   $infile,
                        Recipients      =>   "[EMAIL PROTECTED]"
                        );

if (defined($result)) {
        print "File encrypted OK\n";
} else {
        print "There was a problem encrypting the file\n";
        if (defined(${$pgp}{_errstr})) {
                print "Error: ${$pgp}{_errstr}\n";
        }
}

if (defined($result)) {
        $outfile = $infile . ".enc";
        open(OUTFILE, ">", $outfile) || die "cant open file: $!";
        binmode OUTFILE;
        print OUTFILE $result;
        close(OUTFILE);
        print "Encrypted data written to file.\n";
}

Hello,

Before I state where I am at in this, let me state that there was a bug or two that was fixed in the Par::Packer. You may want to try the new PAR and PP 0.975.

I am trying to duplicate your symptoms on Windows XP, ActiveState 5.8.8 build 820, PAR/PP 0.975. That means installing Crypt::OpenPGP. To do that I need to install Crypt::DSA and Crypt::RSA. I am getting stuck on installing Crypt::DSA.

Test t/02-sign took over a minute using 98% cpu time. I got the message pasted below, but it eventually passed.
-------------paste warning message
t/02-sign.......Name "Crypt::DSA::KeyChain::NULL" used only once: possible typo at ?? line 40. which: no openssl.exe in (C:\Perl\site\bin;C:\Perl\bin;C:\MinGW\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Documents and Settings\malcolm\My Documents\utils;C:\Program Files\GNU\GnuPG;C:\Program Files\Aspell\bin;C:\UnxUtils\usr\local\wbin;C:\Program Files\Subversion\bin;C:\Program Files\QuickTime\QTSystem\)
-------------end paste warning message

The same thing happened with t/03-keygen, except that after 5 minutes at 98% cpu time I killed the process. Nothing seemed happening. Is this normal behaviour? How did you get past this? Did you have problems installing Crypt::DSA? I have a 2GHz, 1Gig memory machine!

Thanks

Reply via email to