This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 274121bc88 Rename method
274121bc88 is described below
commit 274121bc88f640141d78b795ca89cd0668d98554
Author: remm <[email protected]>
AuthorDate: Mon Sep 22 15:10:26 2025 +0200
Rename method
Also add a javadoc for clarification.
---
.../org/apache/tomcat/util/net/TLSClientHelloExtractor.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
b/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
index a2abe6e02f..9aa9076ffd 100644
--- a/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
+++ b/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
@@ -54,6 +54,9 @@ public class TLSClientHelloExtractor {
private static final int TLS_EXTENSION_SERVER_NAME = 0;
private static final int TLS_EXTENSION_SUPPORTED_GROUPS = 10;
+ // Note: Signature algorithms is the name of the extension
+ // Starting with TLS 1.3, this contains signature schemes
+ // For TLS before 1.3, this contains signature algorithms
private static final int TLS_EXTENSION_SIGNATURE_ALGORITHMS = 13;
private static final int TLS_EXTENSION_ALPN = 16;
private static final int TLS_EXTENSION_SUPPORTED_VERSION = 43;
@@ -170,7 +173,7 @@ public class TLSClientHelloExtractor {
readSupportedGroups(netInBuffer,
clientSupportedGroups);
break;
case TLS_EXTENSION_SIGNATURE_ALGORITHMS:
- readSignatureAlgorithms(netInBuffer,
clientSignatureSchemes);
+ readSignatureSchemes(netInBuffer,
clientSignatureSchemes);
break;
case TLS_EXTENSION_ALPN:
readAlpnExtension(netInBuffer,
clientRequestedApplicationProtocols);
@@ -467,15 +470,15 @@ public class TLSClientHelloExtractor {
}
- private static void readSignatureAlgorithms(ByteBuffer bb,
List<SignatureScheme> signatureAlgorithms) {
+ private static void readSignatureSchemes(ByteBuffer bb,
List<SignatureScheme> signatureSchemes) {
// First 2 bytes are size of the signature algorithm list
int toRead = bb.getChar() / 2;
// Then the list of protocols
for (int i = 0; i < toRead; i++) {
char id = bb.getChar();
- SignatureScheme signatureAlgorithm = SignatureScheme.valueOf(id);
- if (signatureAlgorithm != null) {
- signatureAlgorithms.add(signatureAlgorithm);
+ SignatureScheme signatureScheme = SignatureScheme.valueOf(id);
+ if (signatureScheme != null) {
+ signatureSchemes.add(signatureScheme);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]