context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'");
@Override public TrustManagerFactory createTrustManagerFactory(final String algorithm) throws NoSuchAlgorithmException { checkNotNull(algorithm); TrustManagerFactory obj; try { obj = TrustManagerFactory.getInstance(algorithm, getProvider()); } catch (NoSuchAlgorithmException e) { logFallback(e); obj = TrustManagerFactory.getInstance(algorithm); } if (log.isTraceEnabled()) { log.trace("Created trust-manager-factory: {} ({})", obj.getAlgorithm(), obj.getProvider().getName()); } return obj; }
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo("trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory().createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo("trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory().createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo("trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory().createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo("trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory().createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo("trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory().createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo("trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory().createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }
context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'");
/** * Creates trust managers using the receiver's trust store configuration. * @param context context for status messages * @return an array of trust managers or {@code null} if no trust store * configuration was provided * @throws NoSuchProviderException if a provider specified for one * of the trust manager components is not known to the platform * @throws NoSuchAlgorithmException if an algorithm specified for * one of the trust manager components is not known to the relevant * provider * @throws KeyStoreException if an error occurs in reading a key * store containing trust anchors */ private TrustManager[] createTrustManagers(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException { if (getTrustStore() == null) return null; KeyStore trustStore = getTrustStore().createKeyStore(); context.addInfo( "trust store of type '" + trustStore.getType() + "' provider '" + trustStore.getProvider() + "': " + getTrustStore().getLocation()); TrustManagerFactory tmf = getTrustManagerFactory() .createTrustManagerFactory(); context.addInfo("trust manager algorithm '" + tmf.getAlgorithm() + "' provider '" + tmf.getProvider() + "'"); tmf.init(trustStore); return tmf.getTrustManagers(); }