Package org.apache.jmeter.rmi
Class AliasKeyManager
java.lang.Object
org.apache.jmeter.rmi.AliasKeyManager
- All Implemented Interfaces:
KeyManager
,X509KeyManager
Implementation of
KeyManager
that allows using an alias- Since:
- 4.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchooseClientAlias
(String[] keyType, Principal[] issuers, Socket socket) chooseServerAlias
(String keyType, Principal[] issuers, Socket socket) getCertificateChain
(String alias) String[]
getClientAliases
(String keyType, Principal[] issuers) getPrivateKey
(String alias) String[]
getServerAliases
(String keyType, Principal[] issuers) static AliasKeyManager[]
wrap
(KeyManager[] kms, String alias) Wraps the first foundX509KeyManager
that has a private key for the givenalias
as anAliasKeyManager
and returns it as the only element in a newly created array.
-
Constructor Details
-
AliasKeyManager
-
-
Method Details
-
wrap
Wraps the first foundX509KeyManager
that has a private key for the givenalias
as anAliasKeyManager
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 namedalias
- Throws:
IllegalArgumentException
- if no valid KeyManager is found
-
chooseClientAlias
- Specified by:
chooseClientAlias
in interfaceX509KeyManager
-
chooseServerAlias
- Specified by:
chooseServerAlias
in interfaceX509KeyManager
-
getCertificateChain
- Specified by:
getCertificateChain
in interfaceX509KeyManager
-
getClientAliases
- Specified by:
getClientAliases
in interfaceX509KeyManager
-
getPrivateKey
- Specified by:
getPrivateKey
in interfaceX509KeyManager
-
getServerAliases
- Specified by:
getServerAliases
in interfaceX509KeyManager
-