Package org.ldaptive.ssl
Class KeyStoreCredentialConfig
java.lang.Object
org.ldaptive.ssl.KeyStoreCredentialConfig
- All Implemented Interfaces:
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 int
hash code seed.private String
Name of the keystore to use for the SSL connection.private String[]
Keystore aliases to use.private String
Password needed to open the keystore.private final KeyStoreCredentialReader
Handles loading keystores.private String
Keystore type.private String
Name of the truststore to use for the SSL connection.private String[]
Truststore aliases to use.private String
Password needed to open the truststore.private String
Truststore 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.boolean
Returns 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.int
hashCode()
void
setKeyStore
(String name) Sets the name of the keystore to use.void
setKeyStoreAliases
(String... aliases) Sets the aliases of the keystore to use.void
setKeyStorePassword
(String password) Sets the password for the keystore.void
setKeyStoreType
(String type) Sets the type of the keystore.void
setTrustStore
(String name) Sets the name of the truststore to use.void
setTrustStoreAliases
(String... aliases) Sets the aliases of the truststore to use.void
setTrustStorePassword
(String password) Sets the password for the truststore.void
setTrustStoreType
(String type) Sets the type of the truststore.toString()
-
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:CredentialConfig
Creates an SSL context initializer using the configured trust and authentication material in this config.- Specified by:
createSSLContextInitializer
in 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
-