Skip Menu |

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

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

People
Owner: MIKEM [...] cpan.org
Requestors: alexander.bluhm [...] gmx.net
Cc:
AdminCc:

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



Subject: RSA_get_key_parameters() with LibreSSL
To enable RSA_get_key_parameters() with LibreSSL you need another #ifdef as the LibreSSL versioning scheme differs from OpenSSL. I have tested this diff with LibreSSL and commited it to the OpenBSD ports system. Please make sure that it also works for OpenSSL on other platforms. --- SSLeay.xs.orig Wed Jan 4 22:39:08 2017 +++ SSLeay.xs Thu Jan 5 22:01:15 2017 @@ -4989,7 +4989,7 @@ RSA_generate_key(bits,e,perl_cb=&PL_sv_undef,perl_data #endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) void RSA_get_key_parameters(rsa) --- t/local/33_x509_create_cert.t.orig Tue Nov 1 22:46:12 2016 +++ t/local/33_x509_create_cert.t Wed Jan 4 17:39:35 2017 @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 122; +use Test::More tests => 123; use Net::SSLeay qw/MBSTRING_ASC MBSTRING_UTF8 EVP_PK_RSA EVP_PKT_SIGN EVP_PKT_ENC/; use File::Spec; use utf8; @@ -32,9 +32,12 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer, $ca_subject) ok(my $rsa = Net::SSLeay::RSA_generate_key(2048, &Net::SSLeay::RSA_F4), "RSA_generate_key"); ok(Net::SSLeay::EVP_PKEY_assign_RSA($pk,$rsa), "EVP_PKEY_assign_RSA"); -# ONly in pre 1.1: -# my @params = Net::SSLeay::RSA_get_key_parameters($rsa); -# ok(@params == 8, "RSA_get_key_parameters"); + SKIP: { + skip 'openssl<1.1.0 required', 1 unless Net::SSLeay::SSLeay < 0x10100000 + or Net::SSLeay::constant("LIBRESSL_VERSION_NUMBER"); + my @params = Net::SSLeay::RSA_get_key_parameters($rsa); + ok(@params == 8, "RSA_get_key_parameters"); + } ok(my $x509 = Net::SSLeay::X509_new(), "X509_new"); ok(Net::SSLeay::X509_set_pubkey($x509,$pk), "X509_set_pubkey");
Subject: Re: [rt.cpan.org #119756] RSA_get_key_parameters() with LibreSSL
Date: Sun, 08 Jan 2017 13:37:29 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hello Alexander, thanks for your patch it is now in the latest SVN. Cheers. On Saturday, January 07, 2017 10:17:06 PM you wrote: Show quoted text
> Sat Jan 07 22:16:59 2017: Request 119756 was acted upon. > Transaction: Ticket created by bluhm > Queue: Net-SSLeay > Subject: RSA_get_key_parameters() with LibreSSL > Broken in: 1.80 > Severity: (no value) > Owner: Nobody > Requestors: alexander.bluhm@gmx.net > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119756 > > > > To enable RSA_get_key_parameters() with LibreSSL you need another > #ifdef as the LibreSSL versioning scheme differs from OpenSSL. > > I have tested this diff with LibreSSL and commited it to the OpenBSD > ports system. Please make sure that it also works for OpenSSL on > other platforms. > > --- SSLeay.xs.orig Wed Jan 4 22:39:08 2017 > +++ SSLeay.xs Thu Jan 5 22:01:15 2017 > @@ -4989,7 +4989,7 @@ RSA_generate_key(bits,e,perl_cb=&PL_sv_undef,perl_data > > #endif > > -#if OPENSSL_VERSION_NUMBER < 0x10100000L > +#if OPENSSL_VERSION_NUMBER < 0x10100000L || > defined(LIBRESSL_VERSION_NUMBER) > > void > RSA_get_key_parameters(rsa) > --- t/local/33_x509_create_cert.t.orig Tue Nov 1 22:46:12 2016 > +++ t/local/33_x509_create_cert.t Wed Jan 4 17:39:35 2017 > @@ -2,7 +2,7 @@ > > use strict; > use warnings; > -use Test::More tests => 122; > +use Test::More tests => 123; > use Net::SSLeay qw/MBSTRING_ASC MBSTRING_UTF8 EVP_PK_RSA EVP_PKT_SIGN > EVP_PKT_ENC/; use File::Spec; > use utf8; > @@ -32,9 +32,12 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer, $ca_subject) > ok(my $rsa = Net::SSLeay::RSA_generate_key(2048, &Net::SSLeay::RSA_F4), > "RSA_generate_key"); ok(Net::SSLeay::EVP_PKEY_assign_RSA($pk,$rsa), > "EVP_PKEY_assign_RSA"); > > -# ONly in pre 1.1: > -# my @params = Net::SSLeay::RSA_get_key_parameters($rsa); > -# ok(@params == 8, "RSA_get_key_parameters"); > + SKIP: { > + skip 'openssl<1.1.0 required', 1 unless Net::SSLeay::SSLeay < > 0x10100000 + or Net::SSLeay::constant("LIBRESSL_VERSION_NUMBER"); > + my @params = Net::SSLeay::RSA_get_key_parameters($rsa); > + ok(@params == 8, "RSA_get_key_parameters"); > + } > > ok(my $x509 = Net::SSLeay::X509_new(), "X509_new"); > ok(Net::SSLeay::X509_set_pubkey($x509,$pk), "X509_set_pubkey");
-- 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
Subject: Re: [rt.cpan.org #119756] RSA_get_key_parameters() with LibreSSL
Date: Sun, 15 Jan 2017 23:17:07 +0100
To: Mike McCauley via RT <bug-Net-SSLeay [...] rt.cpan.org>
From: Alexander Bluhm <alexander.bluhm [...] gmx.net>
On Sat, Jan 07, 2017 at 10:59:57PM -0500, Mike McCauley via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=119756 > > > thanks for your patch it is now in the latest SVN.
I have just checked the SVN web. Is looks like you have only commited the change log and the test, but have forgotten the SSLeay.xs chunk. https://anonscm.debian.org/viewvc/net-ssleay?view=revision&revision=486 --- SSLeay.xs.orig Wed Jan 4 22:39:08 2017 +++ SSLeay.xs Thu Jan 5 22:01:15 2017 @@ -4989,7 +4989,7 @@ RSA_generate_key(bits,e,perl_cb=&PL_sv_undef,perl_data #endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) void RSA_get_key_parameters(rsa) bluhm
Download signature.asc
application/pgp-signature 801b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #119756] RSA_get_key_parameters() with LibreSSL
Date: Mon, 16 Jan 2017 09:52:14 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] airspayce.com>
Hello Alexander, Ooops, quite right. Now in SVN. Cheers. On Sunday, January 15, 2017 05:22:24 PM Alexander Bluhm via RT wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119756 > > > On Sat, Jan 07, 2017 at 10:59:57PM -0500, Mike McCauley via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=119756 > > > > > thanks for your patch it is now in the latest SVN.
> > I have just checked the SVN web. Is looks like you have only > commited the change log and the test, but have forgotten the SSLeay.xs > chunk. > > https://anonscm.debian.org/viewvc/net-ssleay?view=revision&revision=486 > > --- SSLeay.xs.orig Wed Jan 4 22:39:08 2017 > +++ SSLeay.xs Thu Jan 5 22:01:15 2017 > @@ -4989,7 +4989,7 @@ RSA_generate_key(bits,e,perl_cb=&PL_sv_undef,perl_data > > #endif > > -#if OPENSSL_VERSION_NUMBER < 0x10100000L > +#if OPENSSL_VERSION_NUMBER < 0x10100000L || > defined(LIBRESSL_VERSION_NUMBER) > > void > RSA_get_key_parameters(rsa) > > bluhm
-- 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