Package com.opencloud.slee.remote
Class CompositeX509KeyManager
- java.lang.Object
-
- com.opencloud.slee.remote.CompositeX509KeyManager
-
- All Implemented Interfaces:
KeyManager
,X509KeyManager
public class CompositeX509KeyManager extends Object implements X509KeyManager
Wrap multiple key managers to allow more than one keystore to be used. The first manager passed to the constructor will be preferred. SeeSSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)
: Only the first instance of a particular key and/or trust manager implementation type in the array is used. (For example, only the first javax.net.ssl.X509KeyManager in the array will be used.)
-
-
Constructor Summary
Constructors Constructor Description CompositeX509KeyManager(List<X509KeyManager> keyManagers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
String
chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
X509Certificate[]
getCertificateChain(String alias)
String[]
getClientAliases(String keyType, Principal[] issuers)
PrivateKey
getPrivateKey(String alias)
String[]
getServerAliases(String keyType, Principal[] issuers)
-
-
-
Constructor Detail
-
CompositeX509KeyManager
public CompositeX509KeyManager(List<X509KeyManager> keyManagers)
-
-
Method Detail
-
chooseClientAlias
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
- Specified by:
chooseClientAlias
in interfaceX509KeyManager
-
chooseServerAlias
public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
- Specified by:
chooseServerAlias
in interfaceX509KeyManager
-
getPrivateKey
public PrivateKey getPrivateKey(String alias)
- Specified by:
getPrivateKey
in interfaceX509KeyManager
-
getCertificateChain
public X509Certificate[] getCertificateChain(String alias)
- Specified by:
getCertificateChain
in interfaceX509KeyManager
-
getClientAliases
public String[] getClientAliases(String keyType, Principal[] issuers)
- Specified by:
getClientAliases
in interfaceX509KeyManager
-
getServerAliases
public String[] getServerAliases(String keyType, Principal[] issuers)
- Specified by:
getServerAliases
in interfaceX509KeyManager
-
-