public final class KeyManagerUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KeyManagerUtils.KeyManagerBuilder |
Modifier and Type | Method and Description |
---|---|
static void |
addClientIdentityRoute(X509ExtendedKeyManager keyManager,
String clientAlias,
String... hosts) |
static X509ExtendedKeyManager |
combine(List<? extends X509KeyManager> keyManagers) |
static X509ExtendedKeyManager |
combine(X509KeyManager... keyManagers) |
static X509ExtendedKeyManager |
createKeyManager(KeyStore keyStore,
char[] keyPassword) |
static X509ExtendedKeyManager |
createKeyManager(KeyStore keyStore,
char[] keyPassword,
KeyManagerFactory keyManagerFactory) |
static X509ExtendedKeyManager |
createKeyManager(KeyStore keyStore,
char[] keyPassword,
String keyManagerFactoryAlgorithm) |
static X509ExtendedKeyManager |
createKeyManager(KeyStore keyStore,
char[] keyPassword,
String keyManagerFactoryAlgorithm,
Provider securityProvider) |
static X509ExtendedKeyManager |
createKeyManager(KeyStore keyStore,
char[] keyPassword,
String keyManagerFactoryAlgorithm,
String securityProviderName) |
static X509ExtendedKeyManager |
createKeyManager(KeyStoreHolder... keyStoreHolders) |
static X509ExtendedKeyManager |
createKeyManager(KeyStore keyStore,
Map<String,char[]> aliasToPassword) |
static KeyManagerFactory |
createKeyManagerFactory(KeyManager keyManager) |
static X509ExtendedKeyManager |
createSwappableKeyManager(X509KeyManager keyManager)
Wraps the given KeyManager into an instance of a Hot Swappable KeyManager
This type of KeyManager has the capability of swapping in and out different KeyManagers at runtime.
|
static Map<String,List<String>> |
getClientIdentityRoute(X509ExtendedKeyManager keyManager) |
static <T extends KeyManagerFactory> |
getKeyManager(T keyManagerFactory) |
static KeyManagerUtils.KeyManagerBuilder |
keyManagerBuilder() |
static void |
overrideClientIdentityRoute(X509ExtendedKeyManager keyManager,
String clientAlias,
String... hosts) |
static void |
swapKeyManager(X509KeyManager baseKeyManager,
X509KeyManager newKeyManager)
Swaps the internal TrustManager instance with the given keyManager object.
|
static <T extends X509KeyManager> |
toArray(T keyManager) |
static X509ExtendedKeyManager |
wrapIfNeeded(X509KeyManager keyManager) |
public static X509ExtendedKeyManager combine(X509KeyManager... keyManagers)
public static X509ExtendedKeyManager combine(List<? extends X509KeyManager> keyManagers)
public static <T extends X509KeyManager> X509ExtendedKeyManager[] toArray(T keyManager)
public static X509ExtendedKeyManager createKeyManager(KeyStoreHolder... keyStoreHolders)
public static X509ExtendedKeyManager createKeyManager(KeyStore keyStore, char[] keyPassword)
public static X509ExtendedKeyManager createKeyManager(KeyStore keyStore, char[] keyPassword, String keyManagerFactoryAlgorithm)
public static X509ExtendedKeyManager createKeyManager(KeyStore keyStore, char[] keyPassword, String keyManagerFactoryAlgorithm, String securityProviderName)
public static X509ExtendedKeyManager createKeyManager(KeyStore keyStore, char[] keyPassword, String keyManagerFactoryAlgorithm, Provider securityProvider)
public static X509ExtendedKeyManager createKeyManager(KeyStore keyStore, char[] keyPassword, KeyManagerFactory keyManagerFactory)
public static X509ExtendedKeyManager createKeyManager(KeyStore keyStore, Map<String,char[]> aliasToPassword)
public static X509ExtendedKeyManager wrapIfNeeded(X509KeyManager keyManager)
public static KeyManagerFactory createKeyManagerFactory(KeyManager keyManager)
public static <T extends KeyManagerFactory> X509ExtendedKeyManager getKeyManager(T keyManagerFactory)
public static X509ExtendedKeyManager createSwappableKeyManager(X509KeyManager keyManager)
keyManager
- To be wrapped KeyManagerpublic static void swapKeyManager(X509KeyManager baseKeyManager, X509KeyManager newKeyManager)
HotSwappableX509ExtendedKeyManager
and can be created with createSwappableKeyManager(X509KeyManager)
baseKeyManager
- an instance of HotSwappableX509ExtendedKeyManager
newKeyManager
- to be injected instance of a TrustManagerGenericKeyManagerException
- if baseKeyManager
is not instance of HotSwappableX509ExtendedKeyManager
public static void addClientIdentityRoute(X509ExtendedKeyManager keyManager, String clientAlias, String... hosts)
public static void overrideClientIdentityRoute(X509ExtendedKeyManager keyManager, String clientAlias, String... hosts)
public static Map<String,List<String>> getClientIdentityRoute(X509ExtendedKeyManager keyManager)
public static KeyManagerUtils.KeyManagerBuilder keyManagerBuilder()
Copyright © 2021. All rights reserved.