Skip Menu |

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

Report information
The Basics
Id: 76266
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Net-SSLeay

People
Owner: MIKEM [...] cpan.org
Requestors: kmx [...] volny.cz
Cc:
AdminCc:

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



Subject: Test failure - serial ASN1_INTEGER_get (32_x509_get_cert_info.t + 33_x509_create_cert.t)
Date: Tue, 03 Apr 2012 12:06:05 +0200
To: bug-Net-SSLeay [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
The failure looks like this: http://www.cpantesters.org/cpan/report/f63ee738-7d3b-11e1-9d6f-f6dbfa7543f5 I'll prepare a fix for this approx. tomorrow. -- kmx
From: paul [...] city-fan.org
On Tue Apr 03 06:06:16 2012, kmx@volny.cz wrote: Show quoted text
> The failure looks like this: >
http://www.cpantesters.org/cpan/report/f63ee738-7d3b-11e1-9d6f-f6dbfa7543f5 Show quoted text
> > I'll prepare a fix for this approx. tomorrow.
I'm seeing this with x86_64 builds and openssl < 1.0.0g (certainly up to 1.0.0e). Attached workaround gets it building for me.
Subject: Net-SSLeay-1.46-ASN1_INTEGER.patch
--- t/local/32_x509_get_cert_info.t +++ t/local/32_x509_get_cert_info.t @@ -108,7 +108,12 @@ for my $f (keys (%$dump)) { is(Net::SSLeay::P_ASN1_INTEGER_get_hex($ai), $dump->{$f}->{serial}->{hex}, "serial P_ASN1_INTEGER_get_hex\t$f"); is(Net::SSLeay::P_ASN1_INTEGER_get_dec($ai), $dump->{$f}->{serial}->{dec}, "serial P_ASN1_INTEGER_get_dec\t$f"); - is(Net::SSLeay::ASN1_INTEGER_get($ai), $dump->{$f}->{serial}->{long}, "serial ASN1_INTEGER_get\t$f"); + # Some older openssl versions on 64-bit platforms return 4294967295 rather than -1 + my $asn1_integer = Net::SSLeay::ASN1_INTEGER_get($ai); + if ($asn1_integer == 4294967295) { + $asn1_integer = -1; + } + is($asn1_integer, $dump->{$f}->{serial}->{long}, "serial ASN1_INTEGER_get\t$f"); is(Net::SSLeay::X509_get_version($x509), $dump->{$f}->{version}, "X509_get_version\t$f"); --- t/local/33_x509_create_cert.t +++ t/local/33_x509_create_cert.t @@ -49,7 +49,12 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer ##let us do some ASN1_INTEGER related testing #test big integer via P_ASN1_INTEGER_set_dec Net::SSLeay::P_ASN1_INTEGER_set_dec($sn, '123456789123456789123456789123456789123456789'); - is(Net::SSLeay::ASN1_INTEGER_get(Net::SSLeay::X509_get_serialNumber($x509)), -1, "ASN1_INTEGER_get"); + # Some older openssl versions on 64-bit platforms return 4294967295 rather than -1 + my $asn1_integer = Net::SSLeay::ASN1_INTEGER_get(Net::SSLeay::X509_get_serialNumber($x509)); + if ($asn1_integer == 4294967295) { + $asn1_integer = -1; + } + is($asn1_integer, -1, "ASN1_INTEGER_get"); is(Net::SSLeay::P_ASN1_INTEGER_get_hex(Net::SSLeay::X509_get_serialNumber($x509)), '058936E53D139AFEFABB2683F150B684045F15', "P_ASN1_INTEGER_get_hex"); #test short integer via P_ASN1_INTEGER_set_hex Net::SSLeay::P_ASN1_INTEGER_set_hex($sn, 'D05F14');
Thanks for the patch, Mike please apply it.

The right comment should be:

Show quoted text
# on platforms with 64-bit long int returns 4294967295 rather than -1

--
kmx

Subject: Re: [rt.cpan.org #76266] Test failure - serial ASN1_INTEGER_get (32_x509_get_cert_info.t + 33_x509_create_cert.t)
Date: Wed, 04 Apr 2012 10:50:12 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] open.com.au>
Hi thanks, this is fixed in commit 336 Expect a new release very soon. On Tuesday, April 03, 2012 09:07:16 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=76266 > > > Thanks for the patch, Mike please apply it. > > The right comment should be: > > # on platforms with 64-bit long int returns 4294967295 rather than -1 > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.