pivotal-jbarrett commented on a change in pull request #7315:
URL: https://github.com/apache/geode/pull/7315#discussion_r794214764
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
##########
@@ -362,38 +362,36 @@ public SSLEngine createSSLEngine(String hostName, int
port, boolean clientSocket
}
@VisibleForTesting
- void configureSSLEngine(SSLEngine engine, String hostName, int port, boolean
clientSocket) {
- SSLParameters parameters = engine.getSSLParameters();
- boolean updateEngineWithParameters = false;
+ void configureSSLEngine(final SSLEngine engine, final String hostName, final
int port,
+ final boolean clientSocket) {
+ engine.setUseClientMode(clientSocket);
+ final SSLParameters parameters = engine.getSSLParameters();
+ configureSSLParameters(parameters, hostName, port, clientSocket);
+ engine.setSSLParameters(parameters);
Review comment:
`SSLParameters` is basically a POJO for holding properties of the
`SSLEngine`. If you look at the `SSLEngine::getSSLParameters` it just
constructs a new object with values from the `SSLEngine`. If you look at the
`SSLEngine::setSSLParameters` it sets the values back on the `SSLEngine`. The
issue in the original codes was the interleaving of values set on
`SSLParameters` and `SSLEngine` between the `getSSLParameters` and
`setSSLParameters`, effectively wiping out all the direct `SSLEngine` settings.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]