private SSLContext createAndConfigureSSLContext() throws GeneralSecurityException {

    if (sslConfig.useDefaultSSLContext()) {
      return SSLContext.getDefault();
    }

    SSLContext newSSLContext = SSLUtil.getSSLContextInstance();

    KeyManager[] keyManagers = null;
    if (sslConfig.getKeystore() != null) {
      keyManagers = new KeyManager[] {newFileWatchingKeyManager(sslConfig)};
    }

    TrustManager[] trustManagers = null;
    if (sslConfig.getTruststore() != null) {
      trustManagers = new TrustManager[] {newFileWatchingTrustManager(sslConfig)};
    }

    newSSLContext.init(keyManagers, trustManagers, null /* use the default secure random */);
    return newSSLContext;
  }
Creates & configures the SSLContext when SSL is enabled.

@return new SSLContext configured using the given protocols & properties

@throws GeneralSecurityException if security information can not be found
geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java