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 class
KeyStoreCredentialConfig.Builder
-
Constructor Summary
Constructors Constructor Description KeyStoreCredentialConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyStoreCredentialConfig.Builder
builder()
Creates a builder for this class.SSLContextInitializer
createSSLContextInitializer()
Creates an SSL context initializer using the configured trust and authentication material in this config.boolean
equals(java.lang.Object o)
java.lang.String
getKeyStore()
Returns the name of the keystore to use.java.lang.String[]
getKeyStoreAliases()
Returns the aliases of the keystore to use.java.lang.String
getKeyStorePassword()
Returns the password for the keystore.java.lang.String
getKeyStoreType()
Returns the type of the keystore.java.lang.String
getTrustStore()
Returns the name of the truststore to use.java.lang.String[]
getTrustStoreAliases()
Returns the aliases of the truststore to use.java.lang.String
getTrustStorePassword()
Returns the password for the truststore.java.lang.String
getTrustStoreType()
Returns the type of the truststore.int
hashCode()
void
setKeyStore(java.lang.String name)
Sets the name of the keystore to use.void
setKeyStoreAliases(java.lang.String... aliases)
Sets the aliases of the keystore to use.void
setKeyStorePassword(java.lang.String password)
Sets the password for the keystore.void
setKeyStoreType(java.lang.String type)
Sets the type of the keystore.void
setTrustStore(java.lang.String name)
Sets the name of the truststore to use.void
setTrustStoreAliases(java.lang.String... aliases)
Sets the aliases of the truststore to use.void
setTrustStorePassword(java.lang.String password)
Sets the password for the truststore.void
setTrustStoreType(java.lang.String type)
Sets the type of the truststore.java.lang.String
toString()
-
-
-
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: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:
java.security.GeneralSecurityException
- if the ssl context initializer cannot be created
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static KeyStoreCredentialConfig.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-