algorithm = KeyManagerFactory.getDefaultAlgorithm();
}
// Configure the Keystore Manager
KeyManager[] keyManagers = null;
if (keystore != null) {
KeyStore ks = loadKeyStore(keystore, password, keystoreType);
if (ks != null) {
KeyManagerFactory kmf = KeyManagerFactory.getInstance(algorithm);
kmf.init(ks, password.toCharArray());
keyManagers = kmf.getKeyManagers();
}
}
// Configure the Trust Store Manager
TrustManager[] trustManagers = null;
if (truststore != null) {
KeyStore ks = loadKeyStore(truststore, truststorePassword, keystoreType);
if (ks != null) {
TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm);
tmf.init(ks);
trustManagers = tmf.getTrustManagers();
}