Fix build with libressl.
PR: 246373 Submitted by: Michael Osipov <michael.osipov@siemens.com>
This commit is contained in:
parent
356f24c838
commit
86ec8faaaa
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=535088
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= tomcat-native
|
||||
PORTVERSION= 1.2.24
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= APACHE/tomcat/tomcat-connectors/native/${PORTVERSION}/source
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
|
||||
|
11
www/tomcat-native/files/patch-include_ssl__private.h
Normal file
11
www/tomcat-native/files/patch-include_ssl__private.h
Normal file
@ -0,0 +1,11 @@
|
||||
--- include/ssl_private.h.orig 2020-04-24 19:24:44 UTC
|
||||
+++ include/ssl_private.h
|
||||
@@ -241,7 +241,7 @@
|
||||
#define TLS_server_method SSLv23_server_method
|
||||
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define HAVE_KEYLOG_CALLBACK
|
||||
#endif
|
||||
|
46
www/tomcat-native/files/patch-src_ssl.c
Normal file
46
www/tomcat-native/files/patch-src_ssl.c
Normal file
@ -0,0 +1,46 @@
|
||||
--- src/ssl.c.orig 2020-04-24 19:24:44 UTC
|
||||
+++ src/ssl.c
|
||||
@@ -367,11 +367,6 @@ static apr_status_t ssl_init_cleanup(void *data)
|
||||
#endif
|
||||
free_dh_params();
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
- /* Openssl v1.1+ handles all termination automatically. Do
|
||||
- * nothing in this case.
|
||||
- */
|
||||
-#else
|
||||
/*
|
||||
* Try to kill the internals of the SSL library.
|
||||
*/
|
||||
@@ -394,7 +389,6 @@ static apr_status_t ssl_init_cleanup(void *data)
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
ERR_remove_thread_state(NULL);
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
#ifdef HAVE_KEYLOG_CALLBACK
|
||||
if (key_log_file) {
|
||||
@@ -764,14 +758,7 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS,
|
||||
TCN_FREE_CSTRING(engine);
|
||||
return (jint)APR_SUCCESS;
|
||||
}
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
- /* Openssl v1.1+ handles all initialisation automatically, apart
|
||||
- * from hints as to how we want to use the library.
|
||||
- *
|
||||
- * We tell openssl we want to include engine support.
|
||||
- */
|
||||
- OPENSSL_init_ssl(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
|
||||
-#else
|
||||
+
|
||||
/* We must register the library in full, to ensure our configuration
|
||||
* code can successfully test the SSL environment.
|
||||
*/
|
||||
@@ -785,6 +772,7 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS,
|
||||
#endif
|
||||
OPENSSL_load_builtin_modules();
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if ! (defined(WIN32) || defined(WIN64))
|
||||
err = apr_threadkey_private_create(&thread_exit_key, _ssl_thread_exit,
|
||||
tcn_global_pool);
|
Loading…
Reference in New Issue
Block a user