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

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


The following commit(s) were added to refs/heads/1.3.x by this push:
     new 84a665ce8 OpenSSL 4 compatibility
84a665ce8 is described below

commit 84a665ce8e3b60ba766cb719757a4beb9f0f712a
Author: Rainer Jung <[email protected]>
AuthorDate: Sun Jun 21 10:52:01 2026 +0200

    OpenSSL 4 compatibility
    
    Remove call to ERR_remove_thread_state() from Windows specific code to
    allow building with OpenSSL 4.0.x. ERR_remove_thread_state() is a no-op
    in OpenSSL 1.1+ and got removed in OpenSSL 4. (rjung)
---
 native/os/win32/system.c          | 4 +---
 xdocs/miscellaneous/changelog.xml | 7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/native/os/win32/system.c b/native/os/win32/system.c
index c09cc4959..db387ef66 100644
--- a/native/os/win32/system.c
+++ b/native/os/win32/system.c
@@ -82,6 +82,7 @@ DllMain(
             }
             GetModuleFileName(instance, dll_file_name, sizeof(dll_file_name));
             break;
+
         /** The attached process creates a new thread.
          */
         case DLL_THREAD_ATTACH:
@@ -90,9 +91,6 @@ DllMain(
         /** The thread of the attached process terminates.
          */
         case DLL_THREAD_DETACH:
-#ifdef HAVE_OPENSSL
-            ERR_remove_thread_state(NULL);
-#endif
             break;
 
         /** DLL unload due to process termination
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index ee205e98b..662387bef 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -32,6 +32,13 @@
   </p>
 </section>
 <section name="1.3.9" rtext="in development">
+  <changelog>
+    <scode>
+      Remove call to ERR_remove_thread_state() from Windows specific code to
+      allow building with OpenSSL 4.0.x. ERR_remove_thread_state() is a no-op
+      in OpenSSL 1.1+ and got removed in OpenSSL 4. (rjung)
+    </scode>
+  </changelog>
 </section>
 <section name="1.3.8" rtext="2026-06-15">
   <changelog>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to