ijuma commented on a change in pull request #8695: URL: https://github.com/apache/kafka/pull/8695#discussion_r433271076
########## File path: clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java ########## @@ -580,7 +581,16 @@ public void testTLSDefaults() throws Exception { @Test public void testUnsupportedCipher() throws Exception { - String[] cipherSuites = ((SSLServerSocketFactory) SSLServerSocketFactory.getDefault()).getSupportedCipherSuites(); + String[] cipherSuites; + if (Java.IS_JAVA11_COMPATIBLE) { + cipherSuites = new String[] { + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", Review comment: The previous logic is weird, I agree. I think the idea here is to simply pick a different supported cipher in the server vs the client. I think we can drop `getSupportedCipherSuites` altogether and just pick two ciphers explicitly. The cipher names would be different for TLS 1.2 versus TLS 1.3. Also, we should change the following to simply use the `tlsVersion` field. ``` checkAuthentiationFailed("1", "TLSv1.1"); server.verifyAuthenticationMetrics(0, 1); checkAuthentiationFailed("2", "TLSv1"); server.verifyAuthenticationMetrics(0, 2); ``` ---------------------------------------------------------------- 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