public final class TrustManagerUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TrustManagerUtils.TrustManagerBuilder |
public static X509ExtendedTrustManager combine(X509TrustManager... trustManagers)
public static X509ExtendedTrustManager combine(List<? extends X509TrustManager> trustManagers)
public static <T extends X509TrustManager> X509ExtendedTrustManager[] toArray(T trustManager)
public static X509ExtendedTrustManager createTrustManagerWithJdkTrustedCertificates()
public static Optional<X509ExtendedTrustManager> createTrustManagerWithSystemTrustedCertificates()
public static X509ExtendedTrustManager createTrustManager(KeyStoreHolder... trustStoreHolders)
public static X509ExtendedTrustManager createTrustManager(KeyStore... trustStores)
public static X509ExtendedTrustManager createTrustManager(KeyStore trustStore)
public static X509ExtendedTrustManager createTrustManager(KeyStore trustStore, String trustManagerFactoryAlgorithm)
public static X509ExtendedTrustManager createTrustManager(KeyStore trustStore, String trustManagerFactoryAlgorithm, String securityProviderName)
public static X509ExtendedTrustManager createTrustManager(KeyStore trustStore, String trustManagerFactoryAlgorithm, Provider securityProvider)
public static X509ExtendedTrustManager createTrustManager(KeyStore trustStore, TrustManagerFactory trustManagerFactory)
public static X509ExtendedTrustManager createUnsafeTrustManager()
public static X509ExtendedTrustManager wrapIfNeeded(X509TrustManager trustManager)
public static TrustManagerFactory createTrustManagerFactory(TrustManager trustManager)
public static <T extends TrustManagerFactory> X509ExtendedTrustManager getTrustManager(T trustManagerFactory)
public static X509ExtendedTrustManager createSwappableTrustManager(X509TrustManager trustManager)
trustManager
- To be wrapped TrustManagerpublic static void swapTrustManager(X509TrustManager baseTrustManager, X509TrustManager newTrustManager)
HotSwappableX509ExtendedTrustManager
and can be created with createSwappableTrustManager(X509TrustManager)
baseTrustManager
- an instance of HotSwappableX509ExtendedTrustManager
newTrustManager
- to be injected instance of a TrustManagerGenericTrustManagerException
- if baseTrustManager
is not instance of HotSwappableX509ExtendedTrustManager
public static TrustManagerUtils.TrustManagerBuilder trustManagerBuilder()
Copyright © 2021. All rights reserved.