Skip Menu |
 

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

Report information
The Basics
Id: 3282
Status: resolved
Priority: 0/
Queue: Crypt-SSLeay

People
Owner: CHAMAS [...] cpan.org
Requestors: imran [...] easyspace.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.51
Fixed in: 0.53



Subject: Problem with test t/net_ssl on Perl 5.005_03
Download (untitled) / with headers
text/plain 1.3k
We're upgrading from Crypt::SSLeay 0.16 to 0.51, upgrading using CPAN: Running make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.00503/i686-linux -I/usr/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/net_ssl...........SIGPIPE handler "die" not defined. SIGPIPE handler "die" not defined. SIGPIPE handler "die" not defined. Argument "SSL negotiation failed: at lib/Net/SSL.pm line 212.\n; ..." isn't numeric in sassign at lib/Net/SSL.pm line 153. Argument "SSL negotiation failed: at lib/Net/SSL.pm line 212.\n; ..." isn't numeric in sassign at lib/Net/SSL.pm line 153. Argument "SSL negotiation failed: at lib/Net/SSL.pm line 212.\n; ..." isn't numeric in sassign at lib/Net/SSL.pm line 153. FAILED test 1 Failed 1/1 tests, 0.00% okay t/ssl_context.......ok Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------------------- t/net_ssl.t 1 1 100.00% 1 Failed 1/2 test scripts, 50.00% okay. 1/2 subtests failed, 50.00% okay. make: *** [test_dynamic] Error 29 /usr/bin/make test -- NOT OK Problems: - cannot assign \&die to things in 5.005 - eval problem, return val being assigned nothing because eval breaks - $@ being assigned a string, problematic in 5.005 (A colleague runs perl 5.6.1 and all tests pass OK)
Download (untitled) / with headers
text/plain 913b
I will not be backporting current Crypt::SSLeay releases to 5.005_0x perl versions. Perl 5.6.1 is the oldest platform I will be maintaining the module for. If you would like to submit a patch for 5.005_0x, please feel free, but that patch will have to work for 5.6 & 5.8 versions of perl. To find a build of Crypt::SSLeay that works on 5.005_0x perls, try this link: http://backpan.cpan.org/authors/id/C/CH/CHAMAS/ The build notes from the README seem to indicate that you might have success with .17-.37 version of Crypt::SSLeay. Solaris 2.8 Sparc ? 5.00503 .37 2002-05-31 Christopher Biow Linux 2.2.14 x86 OpenSSL 0.9.6 5.00503 .25 2001-04-10 Joshua Chamas Solaris 2.7 Sparc OpenSSL 0.9.6 5.00503 .22 2001-03-01 Dave Paris Solaris 2.6 x86 OpenSSL 0.9.5a 5.00501 .17 2000-09-04 Joshua Chamas Regards, Josh
From: vek [...] pharmapartners.nl
Download (untitled) / with headers
text/plain 2.3k
[CHAMAS - Mon Aug 18 17:42:46 2003]: Show quoted text
> > I will not be backporting current Crypt::SSLeay releases to 5.005_0x > perl versions. Perl 5.6.1 is the oldest platform I will be
maintaining Show quoted text
> the module for. If you would like to submit a patch for 5.005_0x, > please feel free, but that patch will have to work for 5.6 & 5.8 > versions of perl. > >
Fair enough, However: The lines around line in Net/SSL.pm reads: if($@) { $! = "$@; $!"; die $@; } Assigning to $! (aka errno) is quiestionable in perl 6.5 as well and most likely you intended to assing to $@ instead. That is, I suspect a typo. So this would give: if($@) { $@ = "$@; $!"; die $@; } Wich also works on perl 5.00503, and if you don't like assigning to $@ you could also do: if($@) { die "$@; $!"; } I don't think it is worthwhile making that change, however. Now, for assigning \&die to SIG{PIPE} I don't see any real difference between SIG{PIPE} = \&die; and SIG{PIPE} = 'DEFAULT';. After all the PIPE signal is only triggered in the test when IO::Socket::connect fail to detect that connection was refused and as of perl 5.6 this is no longer a problem. In perl 5.003 connect refused will be properly detected if you leave *$self->{io_socket_peername} undefined until after calling $self->SUPER::connect. Now with this change the module pases the test when connecting to the server is refused. --- SSL.pm.orig Wed May 28 08:26:08 2003 +++ SSL.pm Fri Jan 9 15:41:29 2004 @@ -97,12 +97,12 @@ die $@; } } else { - *$self->{io_socket_peername}=@_ == 1 ? $_[0] : IO::Socket::sockaddr_in(@_); if(!$self->SUPER::connect(@_)) { # better to die than return here $@ = "Connect failed: $@; $!"; die $@; } + *$self->{io_socket_peername}=@_ == 1 ? $_[0] : IO::Socket::sockaddr_in(@_); } # print "ssl_version ".*$self->{ssl_version}."\n"; @@ -119,7 +119,8 @@ my $rv; { - local $SIG{PIPE} = \&die; + ##local $SIG{PIPE} = \&die; + local $SIG{PIPE} = 'DEFAULT'; $rv = eval { $ssl->connect; }; } if ($rv <= 0) { @@ -150,7 +151,7 @@ # odd error in eval {} block, maybe alarm outside the evals if($@) { - $! = "$@; $!"; + $@ = "$@; $!"; die $@; }
The current version builds and tests correctly under 5.005_03.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.