This is an automated email from the ASF dual-hosted git repository. markt-asf pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8a385eeed23c10f3ca2ed5bdca7c611276713e12 Author: Mark Thomas <[email protected]> AuthorDate: Tue Oct 20 18:00:06 2026 +0100 Follow-up to "Fix broken SNI fallback for ClientHello values larger..." Port fix to NIO2. --- java/org/apache/tomcat/util/net/SecureNio2Channel.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SecureNio2Channel.java b/java/org/apache/tomcat/util/net/SecureNio2Channel.java index a04a4e1774..9b016d4fc9 100644 --- a/java/org/apache/tomcat/util/net/SecureNio2Channel.java +++ b/java/org/apache/tomcat/util/net/SecureNio2Channel.java @@ -413,6 +413,8 @@ public class SecureNio2Channel extends Nio2Channel { String hostName = null; List<Cipher> clientRequestedCiphers = null; List<String> clientRequestedApplicationProtocols = null; + List<String> clientRequestedProtocols = null; + List<String> clientRequestedCipherNames = null; List<Group> clientSupportedGroups = null; List<SignatureScheme> clientSignatureSchemes = null; switch (extractor.getResult()) { @@ -423,6 +425,8 @@ public class SecureNio2Channel extends Nio2Channel { //$FALL-THROUGH$ to set the client requested ciphers case NOT_PRESENT: clientRequestedCiphers = extractor.getClientRequestedCiphers(); + clientRequestedProtocols = extractor.getClientRequestedProtocols(); + clientRequestedCipherNames = extractor.getClientRequestedCipherNames(); clientSupportedGroups = extractor.getClientSupportedGroups(); clientSignatureSchemes = extractor.getClientSignatureSchemes(); break; @@ -437,6 +441,11 @@ public class SecureNio2Channel extends Nio2Channel { } hostName = endpoint.getDefaultSSLHostConfigName(); clientRequestedCiphers = Collections.emptyList(); + clientRequestedApplicationProtocols = Collections.emptyList(); + clientRequestedProtocols = Collections.emptyList(); + clientRequestedCipherNames = Collections.emptyList(); + clientSupportedGroups = Collections.emptyList(); + clientSignatureSchemes = Collections.emptyList(); break; case NON_SECURE: netOutBuffer.clear(); @@ -451,13 +460,12 @@ public class SecureNio2Channel extends Nio2Channel { } createSSLEngine(hostName, clientRequestedCiphers, clientRequestedApplicationProtocols, - extractor.getClientRequestedProtocols(), clientSupportedGroups, clientSignatureSchemes); + clientRequestedProtocols, clientSupportedGroups, clientSignatureSchemes); // Populate additional TLS attributes obtained from the handshake that // aren't available from the session - additionalTlsAttributes.put(SSLSupport.REQUESTED_PROTOCOL_VERSIONS_KEY, - extractor.getClientRequestedProtocols()); - additionalTlsAttributes.put(SSLSupport.REQUESTED_CIPHERS_KEY, extractor.getClientRequestedCipherNames()); + additionalTlsAttributes.put(SSLSupport.REQUESTED_PROTOCOL_VERSIONS_KEY, clientRequestedProtocols); + additionalTlsAttributes.put(SSLSupport.REQUESTED_CIPHERS_KEY, clientRequestedCipherNames); // Ensure the application buffers (which have to be created earlier) are // big enough. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
