Subject: | OpenSSL 1.0.2-beta support (SSLv3_method deprecation) |
Recent 1.0.2 betas have dropped the SSLv3_method function. This patch leaves out the function on newer versions, much the same as the SSLv2 deprecation is handled.
It also fixes the ALPN test, which was incorrectly failing on OpenSSL due to the LibreSSL check (earlier versions bailed out before that line).
cheers,
Tom
Subject: | net-ssleay-openssl-1.0.2.patch |
diff --git a/SSLeay.xs b/SSLeay.xs
index 4f55838..a2292b6 100644
--- a/SSLeay.xs
+++ b/SSLeay.xs
@@ -1413,6 +1413,9 @@ SSL_CTX_v2_new()
#endif
#endif
+#ifndef OPENSSL_NO_SSL3
+#if OPENSSL_VERSION_NUMBER < 0x10002000L
+
SSL_CTX *
SSL_CTX_v3_new()
CODE:
@@ -1420,6 +1423,9 @@ SSL_CTX_v3_new()
OUTPUT:
RETVAL
+#endif
+#endif
+
SSL_CTX *
SSL_CTX_v23_new()
CODE:
@@ -3762,9 +3768,15 @@ SSLv2_method()
#endif
#endif
+#ifndef OPENSSL_NO_SSL3
+#if OPENSSL_VERSION_NUMBER < 0x10002000L
+
const SSL_METHOD *
SSLv3_method()
+#endif
+#endif
+
const SSL_METHOD *
TLSv1_method()
diff --git a/t/local/41_alpn_support.t b/t/local/41_alpn_support.t
index ba984b5..87a0214 100644
--- a/t/local/41_alpn_support.t
+++ b/t/local/41_alpn_support.t
@@ -11,7 +11,7 @@ use Config;
BEGIN {
plan skip_all => "openssl 1.0.2 required" unless Net::SSLeay::SSLeay >= 0x10002000;
- plan skip_all => "libressl not supported" if &Net::SSLeay::LIBRESSL_VERSION_NUMBER;
+ 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};
}