roperl has asked for the wisdom of the Perl Monks concerning the following question:
Here is the error message I get:my $ct = $pgp->encrypt( Filename => 'plain.txt', Recipients => $key, C +ipher => 'DES3', SignKeyID => $signkey, SignPassphrase => $GPG_PP ) o +r die "Encryption failed: ", $pgp->errstr; if ($ct) { open( my $fh, '>', 'encrypted.gpg' ); print $fh $ct; close $fh; } else { #print "gpg failed: $pgp->errstr\n"; $err = Crypt::OpenPGP->errstr; print "gpg failed: $err\n"; }
If I look at Crypt/DSA.pm I can see the error message hereData too large for key size at /opt/perl-5.26.0/lib/site_perl/5.26.0/C +rypt/OpenPGP/Key/Secret/DSA.pm line 33.
If I comment out the croak and following if line I can execute the code with no issues. Is there a better workaround then this?my $dlen = length $dgst; my $i = bitsize($key->q) / 8; croak "Data too large for key size" if $dlen > $i || $dlen > 50;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GPG signing Issue
by hippo (Archbishop) on Sep 19, 2018 at 12:59 UTC | |
by hippo (Archbishop) on Jan 29, 2019 at 15:23 UTC | |
by pryrt (Abbot) on Jan 29, 2019 at 17:11 UTC | |
by hippo (Archbishop) on Jan 29, 2019 at 19:06 UTC | |
by pryrt (Abbot) on Jan 31, 2019 at 18:34 UTC | |
|