Skip Menu |

This queue is for tickets about the GnuPG CPAN distribution.

Report information
The Basics
Id: 6563
Status: resolved
Priority: 0/
Queue: GnuPG

People
Owner: Nobody in particular
Requestors: perl [...] crystalflame.net
Cc:
AdminCc:

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



To: bug-GnuPG [...] rt.cpan.org
From: Richard Soderberg <perl [...] crystalflame.net>
Subject: 0.09 needs "&" in front of "POSIX::_SC_OPEN_MAX" to avoid 'strict' failure on OS X.
Date: Wed, 9 Jun 2004 05:24:43 -0700
Hi, I had to change "POSIX::_SC_OPEN_MAX" to "&POSIX::_SC_OPEN_MAX" and the error went away (in GnuPG.pm), so I guess 0.10 will be out soon. Thanks, good luck! - R.
From: ermeyers [...] adelphia.net
On Wed Jun 09 08:24:13 2004, perl@crystalflame.net wrote: Show quoted text
> Hi, I had to change "POSIX::_SC_OPEN_MAX" to "&POSIX::_SC_OPEN_MAX" and > the error went away (in GnuPG.pm), so I guess 0.10 will be out soon. > Thanks, good luck! > > - R. >
It appears that 0.10 didn't come out yet, but I just got the same error on Fedora Core 4 Linux, and I fixed it with "$POSIX::_SC_OPEN_MAX" because I thinks it's SC_OPEN number's maximus. 0.10 please.
I've made a diff of the Debian version and the version available here on CPAN. Copy attached. The Debian version address this problem and some others.
--- GnuPG.pm.orig 2009-04-23 21:06:16.000000000 +0100 +++ GnuPG.pm.debian 2009-04-23 21:05:35.000000000 +0100 @@ -264,7 +264,7 @@ # some ends must be closed in the child. # # Besides this is just plain good hygiene - my $max_fd = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ) || 256; + my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX ) || 256; foreach my $f ( 3 .. $max_fd ) { next if $f == fileno $self->{status_fd}; POSIX::close( $f ); @@ -611,30 +611,12 @@ ( $cmd, $arg ) = $self->read_from_status() if ( $cmd =~ /RSA_OR_IDEA/ ); - # Ignore automatic key imports - ( $cmd, $arg ) = $self->read_from_status() - if ( $cmd =~ /IMPORTED/ ); - - ( $cmd, $arg ) = $self->read_from_status() - if ( $cmd =~ /IMPORT_OK/ ); - - ( $cmd, $arg ) = $self->read_from_status() - if ( $cmd =~ /IMPORT_RES/ ); - $self->abort_gnupg( "invalid signature from ", $arg =~ /[^ ](.+)/, "\n" ) if ( $cmd =~ /BADSIG/); - if ( $cmd =~ /ERRSIG/) - { - my ($keyid, $key_algo, $digest_algo, $sig_class, $timestamp, $rc) - = split ' ', $arg; - if ($rc == 9) - { - ($cmd, $arg) = $self->read_from_status(); - $self->abort_gnupg( "no public key $keyid" ); - } - $self->abort_gnupg( "error verifying signature from $keyid" ) - } + $self->abort_gnupg( "error verifying signature from ", + $arg =~ /([^ ])/, "\n" ) + if ( $cmd =~ /ERRSIG/); $self->abort_gnupg ( "protocol error: expected SIG_ID" ) unless $cmd =~ /SIG_ID/; @@ -646,12 +628,6 @@ my ( $keyid, $name ) = split /\s+/, $arg, 2; ( $cmd, $arg ) = $self->read_from_status; - my $policy_url = undef; - if ( $cmd =~ /POLICY_URL/ ) { - $policy_url = $arg; - ( $cmd, $arg ) = $self->read_from_status; - } - $self->abort_gnupg ( "protocol error: expected VALIDSIG" ) unless $cmd =~ /VALIDSIG/; my ( $fingerprint ) = split /\s+/, $arg, 2; @@ -668,7 +644,6 @@ user => $name, fingerprint => $fingerprint, trust => $trust, - policy_url => $policy_url, }; } @@ -752,27 +727,19 @@ sub decrypt_postread($) { my $self = shift; - my @cmds; # gnupg 1.0.2 adds this status message my ( $cmd, $arg ) = $self->read_from_status; - push @cmds, $cmd; - if ($cmd =~ /BEGIN_DECRYPTION/) { - ( $cmd, $arg ) = $self->read_from_status(); - push @cmds, $cmd; - }; + ( $cmd, $arg ) = $self->read_from_status() + if $cmd =~ /BEGIN_DECRYPTION/; my $sig = undef; - while (defined $cmd && !($cmd =~ /DECRYPTION_OKAY/)) { - if ( $cmd =~ /SIG_ID/ ) { - $sig = $self->check_sig( $cmd, $arg ); - } - ( $cmd, $arg ) = $self->read_from_status(); - push @cmds, $cmd if defined $cmd; - }; + if ( $cmd =~ /SIG_ID/ ) { + $sig = $self->check_sig( $cmd, $arg ); + ( $cmd, $arg ) = $self->read_from_status; + } - my $cmds = join ', ', @cmds; - $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY but never got it (all I saw was: $cmds): \n" ) + $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY got $cmd: \n" ) unless $cmd =~ /DECRYPTION_OKAY/; return $sig ? $sig : 1;
Version 0.10 has just been released and should resolve the problem