Package org.forgerock.secrets
Class SecretsKeyManager
- java.lang.Object
-
- javax.net.ssl.X509ExtendedKeyManager
-
- org.forgerock.secrets.SecretsKeyManager
-
- All Implemented Interfaces:
KeyManager
,X509KeyManager
public class SecretsKeyManager extends X509ExtendedKeyManager
AnX509ExtendedKeyManager
implementation that gets keys and certificates from aSecretsProvider
. This implementation ensures that updates to the secrets are reflected in the keys and certificates available from the key manager. UseSecretsProvider.getKeyManager(Purpose, org.forgerock.util.Options)
to obtain a copy of this key manager.
-
-
Field Summary
Fields Modifier and Type Field Description static Option<String>
KEY_MANAGER_ALGORITHM
The algorithm of the underlyingX509ExtendedKeyManager
implementation to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket)
String
chooseEngineClientAlias(String[] keyTypes, Principal[] issuers, SSLEngine sslEngine)
String
chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine sslEngine)
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)
-
-
-
Field Detail
-
KEY_MANAGER_ALGORITHM
public static final Option<String> KEY_MANAGER_ALGORITHM
The algorithm of the underlyingX509ExtendedKeyManager
implementation to use.
-
-
Method Detail
-
chooseEngineClientAlias
public String chooseEngineClientAlias(String[] keyTypes, Principal[] issuers, SSLEngine sslEngine)
- Overrides:
chooseEngineClientAlias
in classX509ExtendedKeyManager
-
chooseEngineServerAlias
public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine sslEngine)
- Overrides:
chooseEngineServerAlias
in classX509ExtendedKeyManager
-
chooseClientAlias
public String chooseClientAlias(String[] keyTypes, 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)
-
-