You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/09/27 07:29:36 UTC

[GitHub] [httpcomponents-client] ok2c commented on a change in pull request #166: Enforce h2 TLS rules after negotiating TLS, not before

ok2c commented on a change in pull request #166: Enforce h2 TLS rules after negotiating TLS, not before
URL: https://github.com/apache/httpcomponents-client/pull/166#discussion_r328944491
 
 

 ##########
 File path: httpclient5/src/main/java/org/apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java
 ##########
 @@ -130,7 +131,15 @@ public void initialize(final NamedEndpoint endpoint, final SSLEngine sslEngine)
             @Override
             public TlsDetails verify(final NamedEndpoint endpoint, final SSLEngine sslEngine) throws SSLException {
                 verifySession(host.getHostName(), sslEngine.getSession());
-                return createTlsDetails(sslEngine);
+                final TlsDetails tlsDetails = createTlsDetails(sslEngine);
+                final String negotiatedCipherSuite = sslEngine.getSession().getCipherSuite();
+                if (tlsDetails != null && "h2".equals(tlsDetails.getApplicationProtocol())) {
 
 Review comment:
   There is `ApplicationProtocols` enum for supported application protocols. It is used by all application protocol negotiators in core. You might want it to use here as well.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org