@VisibleForTesting
  void configureSSLParameters(final SSLParameters parameters, final String hostName,
      final int port, final boolean clientSocket) {
    if (sslConfig.doEndpointIdentification()) {
      // set server-names so that endpoint identification algorithms can find what's expected
      addServerNameIfNotSet(parameters, new HostAndPort(hostName, port));
    }

    if (clientSocket) {
      checkAndEnableHostnameValidation(parameters);
    } else {
      parameters.setNeedClientAuth(sslConfig.isRequireAuth());
    }

    configureProtocols(clientSocket, parameters);

    configureCipherSuites(parameters);
  }
Returns an SSLEngine that can be used to perform TLS handshakes and communication
geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java