You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/10/31 19:58:38 UTC

[tomcat-native] branch main updated: Follow up to LibreSSL 3.5.2 changes

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/main by this push:
     new 881c19b75 Follow up to LibreSSL 3.5.2 changes
881c19b75 is described below

commit 881c19b7500574297f7533a3753596a25447a1f4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Oct 31 19:58:31 2022 +0000

    Follow up to LibreSSL 3.5.2 changes
    
    Add a change log entry.
    Fix a couple of compilation issues introduced when building with
    OpenSSL.
---
 native/build/tcnative.m4          |  8 ++++++--
 native/include/ssl_private.h      |  5 -----
 native/src/ssl.c                  | 11 -----------
 xdocs/miscellaneous/changelog.xml |  4 ++++
 4 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/native/build/tcnative.m4 b/native/build/tcnative.m4
index 7a8dfe281..3b80fb2c5 100644
--- a/native/build/tcnative.m4
+++ b/native/build/tcnative.m4
@@ -233,8 +233,12 @@ AC_DEFUN([TCN_FIND_SSL_TOOLKIT],[
 #include <stdio.h>
 #include <openssl/opensslv.h>
 int main() {
-        if (OPENSSL_VERSION_NUMBER >= 0x3000000fL || LIBRESSL_VERSION_NUMBER >= 0x3050200fL)
-            return (0);
+    #ifdef LIBRESSL_VERSION_NUMBER
+    if (OPENSSL_VERSION_NUMBER >= 0x3000000fL || LIBRESSL_VERSION_NUMBER >= 0x3050200fL)
+    #else
+    if (OPENSSL_VERSION_NUMBER >= 0x3000000fL)
+    #endif
+        return (0);
     printf("\n\nFound   OPENSSL_VERSION_NUMBER %#010x (" OPENSSL_VERSION_TEXT ")\n",
         OPENSSL_VERSION_NUMBER);
     printf("Require OPENSSL_VERSION_NUMBER 0x3000000f or greater (3.0.0)\n\n");
diff --git a/native/include/ssl_private.h b/native/include/ssl_private.h
index 0e1dc6704..091634df2 100644
--- a/native/include/ssl_private.h
+++ b/native/include/ssl_private.h
@@ -365,12 +365,7 @@ int         SSL_rand_seed(const char *file);
 int         SSL_callback_alpn_select_proto(SSL *, const unsigned char **, unsigned char *, const unsigned char *, unsigned int, void *);
 void        SSL_callback_add_keylog(SSL_CTX *);
 
-#if ! (defined(WIN32) || defined(WIN64))
-unsigned long SSL_ERR_get(void);
-void SSL_ERR_clear(void);
-#else
 #define SSL_ERR_get() ERR_get_error()
 #define SSL_ERR_clear() ERR_clear_error()
-#endif
 
 #endif /* SSL_PRIVATE_H */
diff --git a/native/src/ssl.c b/native/src/ssl.c
index c6838f8e5..a008ec44d 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -43,11 +43,6 @@ static void ssl_keylog_callback(const SSL *ssl, const char *line)
 static jclass byteArrayClass;
 static jclass stringClass;
 
-#if defined(LIBRESSL_VERSION_NUMBER) && ! (defined(WIN32) || defined(WIN64))
-apr_threadkey_t *thread_exit_key;
-static int threadkey_initialized = 0;
-#endif
-
 /*
  * supported_ssl_opts is a bitmask that contains all supported SSL_OP_*
  * options at compile-time. This is used in hasOp to determine which
@@ -306,12 +301,6 @@ static apr_status_t ssl_init_cleanup(void *data)
         return APR_SUCCESS;
     ssl_initialized = 0;
 
-#if ! (defined(WIN32) || defined(WIN64))
-    if (threadkey_initialized) {
-        threadkey_initialized = 0;
-        apr_threadkey_private_delete(thread_exit_key);
-    }
-#endif
     if (tcn_password_callback.cb.obj) {
         JNIEnv *env;
         tcn_get_java_env(&env);
diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml
index fb3dd3f8f..33a6b7f69 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -33,6 +33,10 @@
 </section>
 <section name="Changes in 2.0.2">
   <changelog>
+    <update>
+      Update the minimum supported version of LibreSSL to 3.5.2. Based on pull
+      request <pr>13</pr> provided by orbea. (markt)
+    </update>
   </changelog>
 </section>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org