docs: @Nullable
  	private static SSLContext createInternalSSLContext(Configuration config) throws Exception {
  		checkNotNull(config, "config");
  
  		if (!isInternalSSLEnabled(config)) {
  			return null;
  		}
  		String keystoreFilePath = getAndCheckOption(
  				config, SecurityOptions.SSL_INTERNAL_KEYSTORE, SecurityOptions.SSL_KEYSTORE);
  
  		String keystorePassword = getAndCheckOption(
  				config, SecurityOptions.SSL_INTERNAL_KEYSTORE_PASSWORD, SecurityOptions.SSL_KEYSTORE_PASSWORD);
  
  		String certPassword = getAndCheckOption(
  				config, SecurityOptions.SSL_INTERNAL_KEY_PASSWORD, SecurityOptions.SSL_KEY_PASSWORD);
  
  		String trustStoreFilePath = getAndCheckOption(
  				config, SecurityOptions.SSL_INTERNAL_TRUSTSTORE, SecurityOptions.SSL_TRUSTSTORE);
  
  		String trustStorePassword = getAndCheckOption(
  				config, SecurityOptions.SSL_INTERNAL_TRUSTSTORE_PASSWORD, SecurityOptions.SSL_TRUSTSTORE_PASSWORD);
  
  		String sslProtocolVersion = config.getString(SecurityOptions.SSL_PROTOCOL);
  		int sessionCacheSize = config.getInteger(SecurityOptions.SSL_INTERNAL_SESSION_CACHE_SIZE);
  		int sessionTimeoutMs = config.getInteger(SecurityOptions.SSL_INTERNAL_SESSION_TIMEOUT);
  
  		KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
  		try (InputStream keyStoreFile = Files.newInputStream(new File(keystoreFilePath).toPath())) {
  			keyStore.load(keyStoreFile, keystorePassword.toCharArray());
  		}
  
  		KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
  		try (InputStream trustStoreFile = Files.newInputStream(new File(trustStoreFilePath).toPath())) {
  			trustStore.load(trustStoreFile, trustStorePassword.toCharArray());
  		}
  
  		KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
  		kmf.init(keyStore, certPassword.toCharArray());
  
  		TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
  		tmf.init(trustStore);
  
  		SSLContext sslContext = SSLContext.getInstance(sslProtocolVersion);
  		sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
  		if (sessionCacheSize >= 0) {
  			sslContext.getClientSessionContext().setSessionCacheSize(sessionCacheSize);
  		}
  		if (sessionTimeoutMs >= 0) {
  			sslContext.getClientSessionContext().setSessionTimeout(sessionTimeoutMs / 1000);
  		}
  
  		return sslContext;
  	}