Package org.apache.jmeter.rmi
Class AliasKeyManager
-
- All Implemented Interfaces:
-
javax.net.ssl.KeyManager
,javax.net.ssl.X509KeyManager
public class AliasKeyManager implements X509KeyManager
Implementation of KeyManager that allows using an alias
- Since:
4.0
-
-
Constructor Summary
Constructors Constructor Description AliasKeyManager(X509KeyManager km, String alias)
-
Method Summary
Modifier and Type Method Description static Array<AliasKeyManager>
wrap(Array<KeyManager> kms, String alias)
Wraps the first found X509KeyManager that has a private key for the given alias
as an AliasKeyManager and returns it as the only element in a newly created array.String
chooseClientAlias(Array<String> keyType, Array<Principal> issuers, Socket socket)
String
chooseServerAlias(String keyType, Array<Principal> issuers, Socket socket)
Array<X509Certificate>
getCertificateChain(String alias)
Array<String>
getClientAliases(String keyType, Array<Principal> issuers)
PrivateKey
getPrivateKey(String alias)
Array<String>
getServerAliases(String keyType, Array<Principal> issuers)
-
-
Constructor Detail
-
AliasKeyManager
AliasKeyManager(X509KeyManager km, String alias)
-
-
Method Detail
-
wrap
static Array<AliasKeyManager> wrap(Array<KeyManager> kms, String alias)
Wraps the first found X509KeyManager that has a private key for the given
alias
as an AliasKeyManager and returns it as the only element in a newly created array.- Parameters:
kms
- the KeyManagers to be searched for thealias
alias
- the name to be searched for- Returns:
an array with one AliasKeyManager that has a private key named
alias
-
chooseClientAlias
String chooseClientAlias(Array<String> keyType, Array<Principal> issuers, Socket socket)
-
getCertificateChain
Array<X509Certificate> getCertificateChain(String alias)
-
getPrivateKey
PrivateKey getPrivateKey(String alias)
-
-
-
-