Skip Menu |
 

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

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

People
Owner: MIKEM [...] cpan.org
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

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

Attachments


Subject: [PATCH] Invalid comparison on OBJ_cmp result in t/local/36_verify.t
Download (untitled) / with headers
text/plain 569b
The final test in t/local/36_verify.t compares two unequal ASN objects using OBJ_cmp and expects a return value of 1. The upstream documentation (http://www.openssl.org/docs/crypto/OBJ_nid2obj.html) says that OBJ_cmp returns zero for a match but doesn't specify the return value for a non-matching comparison. Whilst it appears that this value is pretty much always 1, I've just tried building on aarch64 and it came back with a value of 128, resulting in a test failure. The attached patch changes the test to check for a non-zero value, which fixes the issue for me.
Subject: Net-SSLeay-1.55-OBJ_cmp.patch
Index: t/local/36_verify.t =================================================================== --- t/local/36_verify.t (revision 387) +++ t/local/36_verify.t (working copy) @@ -60,6 +60,6 @@ my $asn_object2 = Net::SSLeay::OBJ_txt2obj('1.2.3.4', 0); ok(Net::SSLeay::OBJ_cmp($asn_object2, $asn_object) == 0, 'OBJ_cmp'); $asn_object2 = Net::SSLeay::OBJ_txt2obj('1.2.3.5', 0); -ok(Net::SSLeay::OBJ_cmp($asn_object2, $asn_object) == 1, 'OBJ_cmp'); +ok(Net::SSLeay::OBJ_cmp($asn_object2, $asn_object) != 0, 'OBJ_cmp'); ok(1, 'Finishing up');
Thanks, your fix is now in SVN 388


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.