TrustManager[] managers = null;
if (trustStore != null) {
// Revocation checking is only supported for PKIX algorithm
if (sslConfig.isValidatePeerCerts() &&
sslConfig.getTrustManagerFactoryAlgorithm().equalsIgnoreCase("PKIX")) {
PKIXBuilderParameters pbParams = new PKIXBuilderParameters(trustStore, new X509CertSelector());
// Set maximum certification path length
pbParams.setMaxPathLength(sslConfig.getMaxCertPathLength());
// Make sure revocation checking is enabled
pbParams.setRevocationEnabled(true);