String tsPasswd = getTrustStorePassword();
URL tsPathURL = getTrustStore();
String tsAlg = getTrustStoreAlgorithm();
TrustManagerFactory trustMgrFactory;
KeyStore trustStore = loadKeyStore(tsType, tsPathURL, tsPasswd);
if (getProvider() != null)
{
trustMgrFactory = TrustManagerFactory.getInstance(tsAlg, getProvider());
}
else if (getProviderName() != null)
{
trustMgrFactory = TrustManagerFactory.getInstance(tsAlg, getProviderName());
}
else
{
trustMgrFactory = TrustManagerFactory.getInstance(tsAlg);
}
if (trustStore != null)
{
trustMgrFactory.init(trustStore);
trustManagers = trustMgrFactory.getTrustManagers();
}
}
return trustManagers;
}