Subject: | support for current LibreSSL |
Newer LibreSSL has added support for ALPN and ephemeral has been
removed. This patch updates Net::SSLeay accordingly.
Unfortunately LibreSSL has no way to detect the supported feature
set. So I suggest to use the latest version. I am still discussing
the isse with the LibreSSL developers.
I am not sure how to check for LibreSSL in Perl code.
In my previous patch I used
... if &Net::SSLeay::LIBRESSL_VERSION_NUMBER;
That did not work for OpenSSL so you changed it to
... if defined &Net::SSLeay::LIBRESSL_VERSION_NUMBER;
This is broken with LibreSSL, so let's try
... if defined Net::SSLeay::LIBRESSL_VERSION_NUMBER();
Could you test wether the latter also works with OpenSSL and use
it instead?
--- SSLeay.xs.orig Fri Jan 16 23:19:24 2015
+++ SSLeay.xs Mon Jan 19 02:15:01 2015
@@ -5773,7 +5773,7 @@ OCSP_response_results(rsp,...)
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT)
int
SSL_CTX_set_alpn_select_cb(ctx,callback,data=&PL_sv_undef)
--- t/local/35_ephemeral.t.orig Tue Dec 4 02:49:11 2012
+++ t/local/35_ephemeral.t Mon Jan 19 02:20:29 2015
@@ -2,8 +2,14 @@
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More;
use Net::SSLeay;
+
+BEGIN {
+ plan skip_all => "libressl removed support for ephemeral/temporary RSA private keys" if defined Net::SSLeay::LIBRESSL_VERSION_NUMBER();
+}
+
+plan tests => 3;
Net::SSLeay::randomize();
Net::SSLeay::load_error_strings();
--- t/local/41_alpn_support.t.orig Tue Jan 13 06:44:31 2015
+++ t/local/41_alpn_support.t Mon Jan 19 02:16:07 2015
@@ -11,7 +11,6 @@ use Config;
BEGIN {
plan skip_all => "openssl 1.0.2 required" unless Net::SSLeay::SSLeay >= 0x10002000;
- plan skip_all => "libressl not supported" if defined &Net::SSLeay::LIBRESSL_VERSION_NUMBER;
plan skip_all => "fork() not supported on $^O" unless $Config{d_fork};
}