Subject: | [PATCH] Net-SSLeay 1.50 fails with OpenSSL < 0.9.8f |
Version 1.50 introduces support for function SSL_set_SSL_CTX but
includes this unconditionally, resulting in an unresolved symbol with
OpenSSL < 0.9.8f:
$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/local/*.t
t/handle/local/*.t
t/handle/local/05_use..................
# Failed test 'use Net::SSLeay::Handle;'
# at t/handle/local/05_use.t line 8.
# Tried to use 'Net::SSLeay::Handle'.
# Error: Can't load
'/builddir/build/BUILD/Net-SSLeay-1.50/blib/arch/auto/Net/SSLeay/SSLeay.so'
for module Net::SSLeay:
/builddir/build/BUILD/Net-SSLeay-1.50/blib/arch/auto/Net/SSLeay/SSLeay.so:
undefined symbol: SSL_set_SSL_CTX at
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
# at
/builddir/build/BUILD/Net-SSLeay-1.50/blib/lib/Net/SSLeay/Handle.pm line 7
# Compilation failed in require at
/builddir/build/BUILD/Net-SSLeay-1.50/blib/lib/Net/SSLeay/Handle.pm line 7.
# BEGIN failed--compilation aborted at
/builddir/build/BUILD/Net-SSLeay-1.50/blib/lib/Net/SSLeay/Handle.pm line 7.
# Compilation failed in require at (eval 2) line 2.
# BEGIN failed--compilation aborted at (eval 2) line 2.
dubious
Test returned status 1 (wstat 256, 0x100)
# Looks like you failed 1 test of 1.
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Attached patch fixes this.
Subject: | Net-SSLeay-1.50-set_ssl_ctx.patch |
--- SSLeay.xs
+++ SSLeay.xs
@@ -1609,9 +1609,14 @@
SSL_get_SSL_CTX(s)
SSL * s
+#if OPENSSL_VERSION_NUMBER >= 0x0090806fL
+#define REM18 "NOTE: requires 0.9.8f+"
+
SSL_CTX *
SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
+#endif
+
long
SSL_ctrl(ssl,cmd,larg,parg)
SSL * ssl