Skip Menu |

This queue is for tickets about the Crypt-GPG CPAN distribution.

Report information
The Basics
Id: 13563
Status: resolved
Priority: 0/
Queue: Crypt-GPG

People
Owner: AGUL [...] cpan.org
Requestors: dmorel [...] intradot.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.52
Fixed in: (no value)



Subject: problems with new version of GPG, signature checking, key length etc.
The included patch partially addresses various problems encountered with new versions of gpg and Crypt::GPG. * Incorrect documentation about signature checking : gpg messages are now all uppercase * Key lengths under 1024k are not available anymore, making many tests fail * Signature checking fails in the event the trust level is undefined in trustdb * Decryption fails due to an incorrectly passing the secretkey ID
Of course I forgot the attachment
--- Crypt-GPG-1.52.orig/GPG.pm 2005-02-23 10:14:40.000000000 +0100 +++ Crypt-GPG-1.52/GPG.pm 2005-06-29 11:53:29.000000000 +0200 @@ -173,7 +172,7 @@ last; } elsif ($2) { - if ($2 eq $self->{SECRETKEY}->{ID}) { + if ($2 eq ($self->keydb($self->{SECRETKEY}))[0]->{ID}) { # $self->{SECRETKEY}->{ID} is never used $in .= "$self->{PASSPHRASE}\n"; pump $h until $out =~ /(GOOD|BAD)_PASSPHRASE/g; if ($1 eq 'GOOD') { @@ -215,7 +213,7 @@ unless $x =~ /SIG_ID/s; my @signatures; - $x =~ /SIG_ID \S+ (\S+ \S+).*(GOOD|BAD)SIG (\S{16}).*TRUST_(\S+)/sg; + $x =~ /SIG_ID \S+ (\S+ \S+).*(GOOD|BAD)SIG (\S{16}).*(?:TRUST_(\S+))?/sg; my $signature = {'Validity' => $2, 'KeyID' => $3, 'Time' => $1, 'Trusted' => $4}; $signature->{Time} = str2time ($signature->{Time}); @@ -1022,11 +1018,10 @@ The Crypt::GPG::Signature object can be queried with the following methods: - $sig->validity(); # 'Good', 'BAD', or 'Unknown' + $sig->validity(); # 'GOOD', 'BAD', or 'UNKNOWN' $sig->keyid(); # ID of signing key $sig->time(); # Time the signature was made - $sig->trusted(); # True or false depending on whether - the signing key is trusted + $sig->trusted(); # Signature trust level =item B<msginfo(@ciphertext)> @@ -1076,7 +1076,7 @@ Creates a new keypair with the parameters specified. The only supported B<$keytype> currently is 'ELG-E'. B<$keysize> can be any of -768, 1024, 2048, 3072 or 4096. Returns undef if there was an error, +1024, 2048, 3072 or 4096. Returns undef if there was an error, otherwise returns a filehandle that reports the progress of the key generation process similar to the way GnuPG does. The key generation is not complete till you read an EOF from the returned filehandle. diff -ur Crypt-GPG-1.52.orig/README Crypt-GPG-1.52/README --- Crypt-GPG-1.52.orig/README 2005-02-23 10:13:59.000000000 +0100 +++ Crypt-GPG-1.52/README 2005-06-29 11:54:03.000000000 +0200 @@ -190,7 +190,7 @@ keygen($name, $email, $keytype, $keysize, $expire, $passphrase) Creates a new keypair with the parameters specified. The only - supported $keytype currently is 'ELG-E'. $keysize can be any of 768, + supported $keytype currently is 'ELG-E'. $keysize can be any of 1024, 2048, 3072 or 4096. Returns undef if there was an error, otherwise returns a filehandle that reports the progress of the key generation process similar to the way GnuPG does. The key generation diff -ur Crypt-GPG-1.52.orig/blib/lib/Crypt/GPG.pm Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm --- Crypt-GPG-1.52.orig/blib/lib/Crypt/GPG.pm 2005-02-23 10:14:40.000000000 +0100 +++ Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm 2005-06-29 11:55:11.000000000 +0200 @@ -1076,7 +1076,7 @@ Creates a new keypair with the parameters specified. The only supported B<$keytype> currently is 'ELG-E'. B<$keysize> can be any of -768, 1024, 2048, 3072 or 4096. Returns undef if there was an error, +1024, 2048, 3072 or 4096. Returns undef if there was an error, otherwise returns a filehandle that reports the progress of the key generation process similar to the way GnuPG does. The key generation is not complete till you read an EOF from the returned filehandle. diff -ur Crypt-GPG-1.52.orig/blib/man3/Crypt::GPG.3pm Crypt-GPG-1.52/blib/man3/Crypt::GPG.3pm --- Crypt-GPG-1.52.orig/blib/man3/Crypt::GPG.3pm 2005-06-29 11:42:04.000000000 +0200 +++ Crypt-GPG-1.52/blib/man3/Crypt::GPG.3pm 2005-06-29 11:55:54.000000000 +0200 @@ -370,7 +370,7 @@ .IX Item "keygen($name, $email, $keytype, $keysize, $expire, $passphrase)" Creates a new keypair with the parameters specified. The only supported \fB$keytype\fR currently is '\s-1ELG\-E\s0'. \fB$keysize\fR can be any of -768, 1024, 2048, 3072 or 4096. Returns undef if there was an error, +1024, 2048, 3072 or 4096. Returns undef if there was an error, otherwise returns a filehandle that reports the progress of the key generation process similar to the way GnuPG does. The key generation is not complete till you read an \s-1EOF\s0 from the returned filehandle. diff -ur Crypt-GPG-1.52.orig/t/01-keygen.t Crypt-GPG-1.52/t/01-keygen.t --- Crypt-GPG-1.52.orig/t/01-keygen.t 2005-02-23 10:12:55.000000000 +0100 +++ Crypt-GPG-1.52/t/01-keygen.t 2005-06-29 11:58:18.000000000 +0200 @@ -39,7 +39,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { # Generate key pair diff -ur Crypt-GPG-1.52.orig/t/03-export.t Crypt-GPG-1.52/t/03-export.t --- Crypt-GPG-1.52.orig/t/03-export.t 2005-02-23 10:12:56.000000000 +0100 +++ Crypt-GPG-1.52/t/03-export.t 2005-06-29 11:58:18.000000000 +0200 @@ -28,7 +28,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { # Export our public key diff -ur Crypt-GPG-1.52.orig/t/04-encdec.t Crypt-GPG-1.52/t/04-encdec.t --- Crypt-GPG-1.52.orig/t/04-encdec.t 2005-02-23 10:12:56.000000000 +0100 +++ Crypt-GPG-1.52/t/04-encdec.t 2005-06-29 11:58:18.000000000 +0200 @@ -29,7 +29,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { my ($secretkey) = grep { $_->{Type} =~ /^sec[^\@]?/ } $gpg->keyinfo("A $bits $type"); diff -ur Crypt-GPG-1.52.orig/t/05-sigver.t Crypt-GPG-1.52/t/05-sigver.t --- Crypt-GPG-1.52.orig/t/05-sigver.t 2005-02-23 10:12:57.000000000 +0100 +++ Crypt-GPG-1.52/t/05-sigver.t 2005-06-29 11:58:18.000000000 +0200 @@ -29,7 +29,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { my ($secretkey) = grep { $_->{Type} =~ /^sec[^\@]?/ } $gpg->keyinfo("A $bits $type"); diff -ur Crypt-GPG-1.52.orig/t/06-keyops.t Crypt-GPG-1.52/t/06-keyops.t --- Crypt-GPG-1.52.orig/t/06-keyops.t 2005-02-23 10:12:57.000000000 +0100 +++ Crypt-GPG-1.52/t/06-keyops.t 2005-06-29 11:58:18.000000000 +0200 @@ -36,7 +36,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { my @mykeys = $gpg->keyinfo("A $bits $type");
From: robertojimenoca [...] terra.es
On Jue. Jul. 07 05:05:03 2005, guest wrote: Show quoted text
> Of course I forgot the attachment
The patch is already included in latest Crypt::GPG release. The bug should be closed.
All fixed in 1.61