Class 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
    • Constructor Detail

      • KeyStoreCredentialConfig

        public KeyStoreCredentialConfig()
    • 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 interface CredentialConfig
        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 class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object