Class KeyStoreCredentialConfig

java.lang.Object
org.ldaptive.ssl.KeyStoreCredentialConfig
All Implemented Interfaces:
CredentialConfig

public class KeyStoreCredentialConfig extends Object implements CredentialConfig
Provides the properties necessary for creating an SSL context initializer with a keystore credential reader.
  • Field Details

    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash code seed.
      See Also:
    • keyStoreReader

      private final KeyStoreCredentialReader keyStoreReader
      Handles loading keystores.
    • trustStore

      private String trustStore
      Name of the truststore to use for the SSL connection.
    • trustStorePassword

      private String trustStorePassword
      Password needed to open the truststore.
    • trustStoreType

      private String trustStoreType
      Truststore type.
    • trustStoreAliases

      private String[] trustStoreAliases
      Truststore aliases to use.
    • keyStore

      private String keyStore
      Name of the keystore to use for the SSL connection.
    • keyStorePassword

      private String keyStorePassword
      Password needed to open the keystore.
    • keyStoreType

      private String keyStoreType
      Keystore type.
    • keyStoreAliases

      private String[] keyStoreAliases
      Keystore aliases to use.
  • Constructor Details

    • KeyStoreCredentialConfig

      public KeyStoreCredentialConfig()
  • Method Details

    • getTrustStore

      public String getTrustStore()
      Returns the name of the truststore to use.
      Returns:
      truststore name
    • setTrustStore

      public void setTrustStore(String name)
      Sets the name of the truststore to use.
      Parameters:
      name - truststore name
    • getTrustStorePassword

      public String getTrustStorePassword()
      Returns the password for the truststore.
      Returns:
      truststore password
    • setTrustStorePassword

      public void setTrustStorePassword(String password)
      Sets the password for the truststore.
      Parameters:
      password - truststore password
    • getTrustStoreType

      public String getTrustStoreType()
      Returns the type of the truststore.
      Returns:
      truststore type
    • setTrustStoreType

      public void setTrustStoreType(String type)
      Sets the type of the truststore.
      Parameters:
      type - truststore type
    • getTrustStoreAliases

      public String[] getTrustStoreAliases()
      Returns the aliases of the truststore to use.
      Returns:
      truststore aliases
    • setTrustStoreAliases

      public void setTrustStoreAliases(String... aliases)
      Sets the aliases of the truststore to use.
      Parameters:
      aliases - truststore aliases
    • getKeyStore

      public String getKeyStore()
      Returns the name of the keystore to use.
      Returns:
      keystore name
    • setKeyStore

      public void setKeyStore(String name)
      Sets the name of the keystore to use.
      Parameters:
      name - keystore name
    • getKeyStorePassword

      public String getKeyStorePassword()
      Returns the password for the keystore.
      Returns:
      keystore password
    • setKeyStorePassword

      public void setKeyStorePassword(String password)
      Sets the password for the keystore.
      Parameters:
      password - keystore password
    • getKeyStoreType

      public String getKeyStoreType()
      Returns the type of the keystore.
      Returns:
      keystore type
    • setKeyStoreType

      public void setKeyStoreType(String type)
      Sets the type of the keystore.
      Parameters:
      type - keystore type
    • getKeyStoreAliases

      public String[] getKeyStoreAliases()
      Returns the aliases of the keystore to use.
      Returns:
      keystore aliases
    • setKeyStoreAliases

      public void setKeyStoreAliases(String... aliases)
      Sets the aliases of the keystore to use.
      Parameters:
      aliases - keystore aliases
    • createSSLContextInitializer

      public SSLContextInitializer createSSLContextInitializer() throws 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 interface CredentialConfig
      Returns:
      SSL context initializer
      Throws:
      GeneralSecurityException - if the ssl context initializer cannot be created
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static KeyStoreCredentialConfig.Builder builder()
      Creates a builder for this class.
      Returns:
      new builder