Package org.ldaptive.ssl
Class KeyStoreCredentialConfig
- java.lang.Object
-
- org.ldaptive.ssl.KeyStoreCredentialConfig
-
- All Implemented Interfaces:
CredentialConfig
public class KeyStoreCredentialConfig extends java.lang.Object implements CredentialConfig
Provides the properties necessary for creating an SSL context initializer with a keystore credential reader.- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKeyStoreCredentialConfig.Builder
-
Constructor Summary
Constructors Constructor Description KeyStoreCredentialConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyStoreCredentialConfig.Builderbuilder()Creates a builder for this class.SSLContextInitializercreateSSLContextInitializer()Creates an SSL context initializer using the configured trust and authentication material in this config.booleanequals(java.lang.Object o)java.lang.StringgetKeyStore()Returns the name of the keystore to use.java.lang.String[]getKeyStoreAliases()Returns the aliases of the keystore to use.java.lang.StringgetKeyStorePassword()Returns the password for the keystore.java.lang.StringgetKeyStoreType()Returns the type of the keystore.java.lang.StringgetTrustStore()Returns the name of the truststore to use.java.lang.String[]getTrustStoreAliases()Returns the aliases of the truststore to use.java.lang.StringgetTrustStorePassword()Returns the password for the truststore.java.lang.StringgetTrustStoreType()Returns the type of the truststore.inthashCode()voidsetKeyStore(java.lang.String name)Sets the name of the keystore to use.voidsetKeyStoreAliases(java.lang.String... aliases)Sets the aliases of the keystore to use.voidsetKeyStorePassword(java.lang.String password)Sets the password for the keystore.voidsetKeyStoreType(java.lang.String type)Sets the type of the keystore.voidsetTrustStore(java.lang.String name)Sets the name of the truststore to use.voidsetTrustStoreAliases(java.lang.String... aliases)Sets the aliases of the truststore to use.voidsetTrustStorePassword(java.lang.String password)Sets the password for the truststore.voidsetTrustStoreType(java.lang.String type)Sets the type of the truststore.java.lang.StringtoString()
-
-
-
Method Detail
-
getTrustStore
public java.lang.String getTrustStore()
Returns the name of the truststore to use.- Returns:
- truststore name
-
setTrustStore
public void setTrustStore(java.lang.String name)
Sets the name of the truststore to use.- Parameters:
name- truststore name
-
getTrustStorePassword
public java.lang.String getTrustStorePassword()
Returns the password for the truststore.- Returns:
- truststore password
-
setTrustStorePassword
public void setTrustStorePassword(java.lang.String password)
Sets the password for the truststore.- Parameters:
password- truststore password
-
getTrustStoreType
public java.lang.String getTrustStoreType()
Returns the type of the truststore.- Returns:
- truststore type
-
setTrustStoreType
public void setTrustStoreType(java.lang.String type)
Sets the type of the truststore.- Parameters:
type- truststore type
-
getTrustStoreAliases
public java.lang.String[] getTrustStoreAliases()
Returns the aliases of the truststore to use.- Returns:
- truststore aliases
-
setTrustStoreAliases
public void setTrustStoreAliases(java.lang.String... aliases)
Sets the aliases of the truststore to use.- Parameters:
aliases- truststore aliases
-
getKeyStore
public java.lang.String getKeyStore()
Returns the name of the keystore to use.- Returns:
- keystore name
-
setKeyStore
public void setKeyStore(java.lang.String name)
Sets the name of the keystore to use.- Parameters:
name- keystore name
-
getKeyStorePassword
public java.lang.String getKeyStorePassword()
Returns the password for the keystore.- Returns:
- keystore password
-
setKeyStorePassword
public void setKeyStorePassword(java.lang.String password)
Sets the password for the keystore.- Parameters:
password- keystore password
-
getKeyStoreType
public java.lang.String getKeyStoreType()
Returns the type of the keystore.- Returns:
- keystore type
-
setKeyStoreType
public void setKeyStoreType(java.lang.String type)
Sets the type of the keystore.- Parameters:
type- keystore type
-
getKeyStoreAliases
public java.lang.String[] getKeyStoreAliases()
Returns the aliases of the keystore to use.- Returns:
- keystore aliases
-
setKeyStoreAliases
public void setKeyStoreAliases(java.lang.String... aliases)
Sets the aliases of the keystore to use.- Parameters:
aliases- keystore aliases
-
createSSLContextInitializer
public SSLContextInitializer createSSLContextInitializer() throws java.security.GeneralSecurityException
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:
java.security.GeneralSecurityException- if the ssl context initializer cannot be created
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static KeyStoreCredentialConfig.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-