Package org.ldaptive.ssl
Class KeyStoreCredentialConfig
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.ssl.KeyStoreCredentialConfig
- All Implemented Interfaces:
Freezable,CredentialConfig
Provides the properties necessary for creating an SSL context initializer with a keystore credential reader.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final inthash code seed.private StringName of the keystore to use for the SSL connection.private String[]Keystore aliases to use.private StringPassword needed to open the keystore.private final KeyStoreCredentialReaderHandles loading keystores.private StringKeystore type.private StringName of the truststore to use for the SSL connection.private String[]Truststore aliases to use.private StringPassword needed to open the truststore.private StringTruststore type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder for this class.Creates an SSL context initializer using the configured trust and authentication material in this config.booleanReturns the name of the keystore to use.String[]Returns the aliases of the keystore to use.Returns the password for the keystore.Returns the type of the keystore.Returns the name of the truststore to use.String[]Returns the aliases of the truststore to use.Returns the password for the truststore.Returns the type of the truststore.inthashCode()voidsetKeyStore(String name) Sets the name of the keystore to use.voidsetKeyStoreAliases(String... aliases) Sets the aliases of the keystore to use.voidsetKeyStorePassword(String password) Sets the password for the keystore.voidsetKeyStoreType(String type) Sets the type of the keystore.voidsetTrustStore(String name) Sets the name of the truststore to use.voidsetTrustStoreAliases(String... aliases) Sets the aliases of the truststore to use.voidsetTrustStorePassword(String password) Sets the password for the truststore.voidsetTrustStoreType(String type) Sets the type of the truststore.toString()Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
keyStoreReader
Handles loading keystores. -
trustStore
Name of the truststore to use for the SSL connection. -
trustStorePassword
Password needed to open the truststore. -
trustStoreType
Truststore type. -
trustStoreAliases
Truststore aliases to use. -
keyStore
Name of the keystore to use for the SSL connection. -
keyStorePassword
Password needed to open the keystore. -
keyStoreType
Keystore type. -
keyStoreAliases
Keystore aliases to use.
-
-
Constructor Details
-
KeyStoreCredentialConfig
public KeyStoreCredentialConfig()
-
-
Method Details
-
getTrustStore
Returns the name of the truststore to use.- Returns:
- truststore name
-
setTrustStore
Sets the name of the truststore to use.- Parameters:
name- truststore name
-
getTrustStorePassword
Returns the password for the truststore.- Returns:
- truststore password
-
setTrustStorePassword
Sets the password for the truststore.- Parameters:
password- truststore password
-
getTrustStoreType
Returns the type of the truststore.- Returns:
- truststore type
-
setTrustStoreType
Sets the type of the truststore.- Parameters:
type- truststore type
-
getTrustStoreAliases
Returns the aliases of the truststore to use.- Returns:
- truststore aliases
-
setTrustStoreAliases
Sets the aliases of the truststore to use.- Parameters:
aliases- truststore aliases
-
getKeyStore
Returns the name of the keystore to use.- Returns:
- keystore name
-
setKeyStore
Sets the name of the keystore to use.- Parameters:
name- keystore name
-
getKeyStorePassword
Returns the password for the keystore.- Returns:
- keystore password
-
setKeyStorePassword
Sets the password for the keystore.- Parameters:
password- keystore password
-
getKeyStoreType
Returns the type of the keystore.- Returns:
- keystore type
-
setKeyStoreType
Sets the type of the keystore.- Parameters:
type- keystore type
-
getKeyStoreAliases
Returns the aliases of the keystore to use.- Returns:
- keystore aliases
-
setKeyStoreAliases
Sets the aliases of the keystore to use.- Parameters:
aliases- keystore aliases
-
createSSLContextInitializer
Description copied from interface:CredentialConfigCreates an SSL context initializer using the configured trust and authentication material in this config.- Specified by:
createSSLContextInitializerin interfaceCredentialConfig- Returns:
- SSL context initializer
- Throws:
GeneralSecurityException- if the ssl context initializer cannot be created
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
Creates a builder for this class.- Returns:
- new builder
-