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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new ccbe01a52a Fix possible TLS connections failures
ccbe01a52a is described below

commit ccbe01a52a9b255ad98e71b5bed76ed10a099503
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 17 23:22:53 2026 +0100

    Fix possible TLS connections failures
    
    Caused by one of the flags Tomcat uses to track TLS handshake progress
    not being correctly reset.
---
 java/org/apache/tomcat/util/net/SecureNioChannel.java | 3 +++
 webapps/docs/changelog.xml                            | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/tomcat/util/net/SecureNioChannel.java 
b/java/org/apache/tomcat/util/net/SecureNioChannel.java
index 8f373e2500..aab9a39482 100644
--- a/java/org/apache/tomcat/util/net/SecureNioChannel.java
+++ b/java/org/apache/tomcat/util/net/SecureNioChannel.java
@@ -112,6 +112,7 @@ public class SecureNioChannel extends NioChannel {
         if (channel != null) {
             sniComplete = false;
             handshakeComplete = false;
+            needHandshakeWrap = false;
             closed = false;
             closing = false;
             netInBuffer.clear();
@@ -917,6 +918,8 @@ public class SecureNioChannel extends NioChannel {
         netOutBuffer.clear();
 
         SSLEngineResult result = sslEngine.wrap(srcs, offset, length, 
netOutBuffer);
+        // Call to wrap() will have included any required handshake data
+        needHandshakeWrap = false;
         // The number of bytes written
         int written = result.bytesConsumed();
         netOutBuffer.flip();
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 81d5c71140..598f0950ad 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -204,6 +204,10 @@
       <fix>
         Correct a narrow race condition when processing HTTP/2 headers. (markt)
       </fix>
+      <fix>
+        Fix possible TLS connections failures caused by one of the flags Tomcat
+        uses to track TLS handshake progress not being correctly reset. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


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

Reply via email to