Class X509AliasKeyManager
- java.lang.Object
-
- javax.net.ssl.X509ExtendedKeyManager
-
- org.apache.qpid.protonj2.client.transport.X509AliasKeyManager
-
- All Implemented Interfaces:
KeyManager
,X509KeyManager
public class X509AliasKeyManager extends X509ExtendedKeyManager
An X509ExtendedKeyManager wrapper which always chooses and only returns the given alias, and defers retrieval to the delegate key manager.
-
-
Constructor Summary
Constructors Constructor Description X509AliasKeyManager(String alias, X509ExtendedKeyManager delegate)
Creates a new alias manager with the provided configuration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
String
chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine)
String
chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)
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
-
X509AliasKeyManager
public X509AliasKeyManager(String alias, X509ExtendedKeyManager delegate) throws IllegalArgumentException
Creates a new alias manager with the provided configuration- Parameters:
alias
- The alias value to be used.delegate
- A delegate that will be used by this manager instance.- Throws:
IllegalArgumentException
- if no alias is provided for this manager.
-
-
Method Detail
-
chooseClientAlias
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
-
chooseServerAlias
public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
-
getCertificateChain
public X509Certificate[] getCertificateChain(String alias)
-
getPrivateKey
public PrivateKey getPrivateKey(String alias)
-
chooseEngineClientAlias
public String chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine)
- Overrides:
chooseEngineClientAlias
in classX509ExtendedKeyManager
-
chooseEngineServerAlias
public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)
- Overrides:
chooseEngineServerAlias
in classX509ExtendedKeyManager
-
-