/** * Gets the intialized trust managers. * @throws GeneralSecurityException * @throws IOException */ protected TrustManager[] getTrustManagers() throws GeneralSecurityException, IOException { KeyStore trustStore = this.getTrustStore(); if (trustStore == null) return null; String algorithm = this.config.getSslTrustAlgorithm(); TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm); if (this.config.getSslCrlFile() == null) { tmf.init(trustStore); return tmf.getTrustManagers(); } CertPathParameters params = this.getParameters(algorithm, this.config.getSslCrlFile(), trustStore); ManagerFactoryParameters mfp = new CertPathTrustManagerParameters(params); tmf.init(mfp); return tmf.getTrustManagers(); }
/** * Gets the initialized trust managers. * * @throws GeneralSecurityException * @throws IOException */ protected TrustManager[] getTrustManagers() throws GeneralSecurityException, IOException { KeyStore trustStore = this.getTrustStore(); if (trustStore == null) return null; String algorithm = this.config.getSslTrustAlgorithm(); TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm); if (this.config.getSslCrlFile() == null) { tmf.init(trustStore); return tmf.getTrustManagers(); } CertPathParameters params = this.getParameters(algorithm, this.config.getSslCrlFile(), trustStore); ManagerFactoryParameters mfp = new CertPathTrustManagerParameters(params); tmf.init(mfp); return tmf.getTrustManagers(); }
/** * Gets the initialized trust managers. * * @throws GeneralSecurityException * @throws IOException */ protected TrustManager[] getTrustManagers() throws GeneralSecurityException, IOException { KeyStore trustStore = this.getTrustStore(); if (trustStore == null) return null; String algorithm = this.config.getSslTrustAlgorithm(); TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm); if (this.config.getSslCrlFile() == null) { tmf.init(trustStore); return tmf.getTrustManagers(); } CertPathParameters params = this.getParameters(algorithm, this.config.getSslCrlFile(), trustStore); ManagerFactoryParameters mfp = new CertPathTrustManagerParameters(params); tmf.init(mfp); return tmf.getTrustManagers(); }