Package org.ldaptive.ssl
Class DefaultSSLContextInitializer
java.lang.Object
org.ldaptive.ssl.AbstractSSLContextInitializer
org.ldaptive.ssl.DefaultSSLContextInitializer
- All Implemented Interfaces:
SSLContextInitializer
Provides a default implementation of SSL context initializer which allows the setting of trust and key managers in
order to create an SSL context.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanWhether default trust managers should be created.private KeyManager[]Key managers.Fields inherited from class org.ldaptive.ssl.AbstractSSLContextInitializer
logger, trustManagers -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new default ssl context initializer.DefaultSSLContextInitializer(boolean defaultTrustManagers) Creates a new default ssl context initializer. -
Method Summary
Modifier and TypeMethodDescriptionprotected TrustManager[]Creates any trust managers specific to this context initializer.Returns the key managers used when creating SSL contexts.voidsetKeyManagers(KeyManager... managers) Sets the key managers.toString()Methods inherited from class org.ldaptive.ssl.AbstractSSLContextInitializer
aggregateTrustManagers, getTrustManagers, initSSLContext, setTrustManagers
-
Field Details
-
keyManagers
Key managers. -
createDefaultTrustManagers
private final boolean createDefaultTrustManagersWhether default trust managers should be created.
-
-
Constructor Details
-
DefaultSSLContextInitializer
public DefaultSSLContextInitializer()Creates a new default ssl context initializer. Default trust managers will be produced. -
DefaultSSLContextInitializer
public DefaultSSLContextInitializer(boolean defaultTrustManagers) Creates a new default ssl context initializer.- Parameters:
defaultTrustManagers- whether default trust managers should be created
-
-
Method Details
-
createTrustManagers
Description copied from class:AbstractSSLContextInitializerCreates any trust managers specific to this context initializer.- Specified by:
createTrustManagersin classAbstractSSLContextInitializer- Returns:
- trust managers
- Throws:
GeneralSecurityException- if an errors occurs while loading the TrustManagers
-
getKeyManagers
Description copied from interface:SSLContextInitializerReturns the key managers used when creating SSL contexts.- Returns:
- key managers
- Throws:
GeneralSecurityException- if an errors occurs while loading the KeyManagers
-
setKeyManagers
Sets the key managers.- Parameters:
managers- key managers
-
toString
-