Skip Menu |

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

Report information
The Basics
Id: 101361
Status: resolved
Priority: 0/
Queue: Net-SSLeay

People
Owner: MIKEM [...] cpan.org
Requestors: GAAS [...] cpan.org
Cc:
AdminCc:

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



Subject: t/external/20_cert_chain.t fails for older machines
We have various build machines running Solaris/HP-UX/AIX that all fail the t/external/20_cert_chain.t test with:

$ perl t/external/20_cert_chain.t.orig
1..3
connect: Cannot assign requested address at 20_cert_chain.t.orig line 29.
# Looks like your test exited with 126 before it could output anything.

Example failure from http://www.cpantesters.org/cpan/report/17fac5b6-3a97-11e4-ac16-c7f8fdd5935a

The issue seems to be that getservbyname('https', 'tcp') doesn't return 443 on those machines because there is no entry for 'https' in /etc/protocols.
Suggested patch:




commit eb74b02646422f1953d47e91ef062b0635270bbc
Author: Gisle Aas <gisle@activestate.com>
Date:   Tue Jan 6 14:20:49 2015 -0800
 
    Not all machines can look up the port for https
 
    This avoids test failures for Solaris/AIX/HP-UX and such machines.
 
diff --git a/t/external/20_cert_chain.t b/t/external/20_cert_chain.t
index 1fee905..22b24c4 100644
--- a/t/external/20_cert_chain.t
+++ b/t/external/20_cert_chain.t
@@ -22,7 +22,7 @@ else {
 
 for my $site (@sites) {
     SKIP: {
-       my $port = getservbyname  ('https', 'tcp');
+       my $port = getservbyname ('https', 'tcp') || 443;
        my $dest_ip = gethostbyname ( $site );
 
        socket  (S, &AF_INET, &SOCK_STREAM, 0)  or die "socket: $!";
Subject: Re: [rt.cpan.org #101361] t/external/20_cert_chain.t fails for older machines
Date: Wed, 07 Jan 2015 09:54:26 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hi Gisle, Thanks for the patch. Its now in SVN commit 430. Maybe time for a new release? Cheers. On Tuesday, January 06, 2015 05:30:09 PM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101361 > > > Suggested patch: > > > > commit eb74b02646422f1953d47e91ef062b0635270bbc Author: Gisle Aas > <gisle@activestate.com> Date: Tue Jan 6 14:20:49 2015 -0800 Not all machines > can look up the port for https This avoids test failures for > Solaris/AIX/HP-UX and such machines. > https://rt.cpan.org/Ticket/Display.html?id=101361 diff --git > a/t/external/20_cert_chain.t b/t/external/20_cert_chain.t index > 1fee905..22b24c4 100644 --- a/t/external/20_cert_chain.t +++ > b/t/external/20_cert_chain.t @@ -22,7 +22,7 @@ else { for my $site (@sites) > { SKIP: { - my $port = getservbyname ('https', 'tcp'); + my $port = > getservbyname ('https', 'tcp') || 443; my $dest_ip = gethostbyname ( $site > ); socket (S, &AF_INET, &SOCK_STREAM, 0) or die "socket: $!";
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474