bschuchardt commented on a change in pull request #5465: URL: https://github.com/apache/geode/pull/5465#discussion_r472538826
########## File path: geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java ########## @@ -98,6 +102,30 @@ private void testBindExceptionMessageFormatting(InetAddress inetAddress) throws } } + @Test + public void configureSSLEngine() { + SSLConfig config = new SSLConfig.Builder().setCiphers("someCipher").setEnabled(true) + .setProtocols("someProtocol").setRequireAuth(true).setKeystore("someKeystore.jks") + .setAlias("someAlias").setTruststore("someTruststore.jks") + .setEndpointIdentificationEnabled(true).build(); + SSLContext context = mock(SSLContext.class); + SSLParameters parameters = mock(SSLParameters.class); + + SocketCreator socketCreator = new SocketCreator(config, context); + + SSLEngine engine = mock(SSLEngine.class); + when(engine.getSSLParameters()).thenReturn(parameters); + + engine.setEnableSessionCreation(true); + socketCreator.configureSSLEngine(engine, "somehost", 12345, true); + + verify(engine).setUseClientMode(isA(Boolean.class)); + verify(engine).setSSLParameters(parameters); + verify(engine).setEnabledCipherSuites(isA(String[].class)); Review comment: yes, I was being lazy there. I've corrected that ---------------------------------------------------------------- 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