martin-g commented on a change in pull request #380:
URL: https://github.com/apache/tomcat/pull/380#discussion_r532527179



##########
File path: java/org/apache/catalina/util/TLSUtil.java
##########
@@ -38,6 +38,8 @@ public static boolean isTLSRequestAttribute(String name) {
                 Globals.KEY_SIZE_ATTR.equals(name)  ||
                 Globals.SSL_SESSION_ID_ATTR.equals(name) ||
                 Globals.SSL_SESSION_MGR_ATTR.equals(name) ||
-                SSLSupport.PROTOCOL_VERSION_KEY.equals(name);
+                SSLSupport.PROTOCOL_VERSION_KEY.equals(name) ||
+                SSLSupport.REQUESTED_PROTOCOL_VERSIONS_KEY.equals(name) ||
+                SSLSupport.REQUESTED_CIPHERS_KEY.equals(name);

Review comment:
       I think this would look and read nicer if we use `switch (String)`. 
Extra benefit: it will be faster!

##########
File path: java/org/apache/tomcat/util/net/SecureNioChannel.java
##########
@@ -68,6 +71,8 @@
     protected boolean closed = false;
     protected boolean closing = false;
 
+    private Map<String,List<String>> additionalTlsAttributes = new HashMap<>();

Review comment:
       `final`

##########
File path: java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
##########
@@ -193,6 +214,15 @@ public String getSNIValue() {
     }
 
 
+    public List<String> getClientRequestedCipherNames() {
+        if (result == ExtractorResult.COMPLETE || result == 
ExtractorResult.NOT_PRESENT) {
+            return clientRequestedCipherNames;
+        } else {
+            throw new IllegalStateException();

Review comment:
       Intentionally without a message ?

##########
File path: java/org/apache/tomcat/util/net/SecureNio2Channel.java
##########
@@ -70,6 +73,8 @@
     protected boolean closed;
     protected boolean closing;
 
+    private Map<String,List<String>> additionalTlsAttributes = new HashMap<>();

Review comment:
       I see there are some `volatile` member fields in this class.  Should 
`sniComplete` be `volatile` as well ?

##########
File path: java/org/apache/tomcat/util/net/SecureNio2Channel.java
##########
@@ -70,6 +73,8 @@
     protected boolean closed;
     protected boolean closing;
 
+    private Map<String,List<String>> additionalTlsAttributes = new HashMap<>();

Review comment:
       could be `final`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to