static KeyManagerFactory getKeyManagerFactory(SSLConfig config) throws GeneralSecurityException, IOException {
    KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
    KeyStore ks = loadKeyStore(config.sslKeystorePath, config.sslKeystoreType, config.sslKeystorePassword);
    String keyPassword = config.sslKeyPassword.isEmpty() ? config.sslKeystorePassword : config.sslKeyPassword;
    kmf.init(ks, keyPassword.toCharArray());
    return kmf;
  }
@param config the {@link SSLConfig}.
@return an initialized {@link KeyManagerFactory}
@throws GeneralSecurityException
@throws IOException
ambry-commons/src/main/java/com/github/ambry/commons/NettySslFactory.java