Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to generate a keypair using OpenPGP on a win32
machine. I am running perl v5.8.2. The code runs
with Verbosity set to true and generates the following output.

........................*
......<lots more dots>.......*
Can't call method "keysize" on an undefined value at C:/perl/site/lib/Crypt/OpenPGP/Certificate.pm line 333.

Could anyone point me in the direction of the cause of
this error?
Any help is appreciated.

This is the code I am running.

use Crypt::OpenPGP; my $pgp = Crypt::OpenPGP->new (); $pgp->keygen( Type => 'DSA', Size => 1024, Identity => 'Garett L Holmes<br> <gaholmes@hotmail.com>' +, Passphrase => 'password', Verbosity => '1') or die $pgp->errstr;<br>

janitored by ybiC: Closed unbalanced <code> tag

Replies are listed 'Best First'.
Re: crypt::OpenPGP keygen errors
by matija (Priest) on Mar 11, 2004 at 15:34 UTC
    To me it looks like OpenPGP is expecting you to provide the parameter 'keysize', while you are providing the parameter 'Size'.
      Unfortunatly that wasn't it. Thanks anyway. I tried changing Size (thought the docs do say to use Size) to Keysize, keysize, and KeySize to no avial. I would love to try RSA type but the module install is giving me trouble so DSA seems like my only option.
        The problem was that I did not have Crypt-DES_EDE3 installed.