Package org.apache.hadoop.security.ssl
Class ReloadingX509KeystoreManager
java.lang.Object
javax.net.ssl.X509ExtendedKeyManager
org.apache.hadoop.security.ssl.ReloadingX509KeystoreManager
- All Implemented Interfaces:
KeyManager,X509KeyManager
An implementation of
X509KeyManager that exposes a method,
loadFrom(Path) to reload its configuration. Note that it is necessary
to implement the X509ExtendedKeyManager to properly delegate
the additional methods, otherwise the SSL handshake will fail.-
Constructor Summary
ConstructorsConstructorDescriptionReloadingX509KeystoreManager(String type, String location, String storePassword, String keyPassword) Construct aReloading509KeystoreManager -
Method Summary
Modifier and TypeMethodDescriptionchooseClientAlias(String[] strings, Principal[] principals, Socket socket) chooseEngineClientAlias(String[] strings, Principal[] principals, SSLEngine sslEngine) chooseEngineServerAlias(String s, Principal[] principals, SSLEngine sslEngine) chooseServerAlias(String s, Principal[] principals, Socket socket) String[]getClientAliases(String s, Principal[] principals) String[]getServerAliases(String s, Principal[] principals)
-
Constructor Details
-
ReloadingX509KeystoreManager
public ReloadingX509KeystoreManager(String type, String location, String storePassword, String keyPassword) throws IOException, GeneralSecurityException Construct aReloading509KeystoreManager- Parameters:
type- type of keystore file, typically 'jks'.location- local path to the keystore file.storePassword- password of the keystore file.keyPassword- The password of the key.- Throws:
IOException- raised on errors performing I/O.GeneralSecurityException- thrown if create encryptor error.
-
-
Method Details
-
chooseEngineClientAlias
public String chooseEngineClientAlias(String[] strings, Principal[] principals, SSLEngine sslEngine) - Overrides:
chooseEngineClientAliasin classX509ExtendedKeyManager
-
chooseEngineServerAlias
- Overrides:
chooseEngineServerAliasin classX509ExtendedKeyManager
-
getClientAliases
-
chooseClientAlias
-
getServerAliases
-
chooseServerAlias
-
getCertificateChain
-
getPrivateKey
-
loadFrom
-