Class SSLServerConfiguration

    • Constructor Detail

      • SSLServerConfiguration

        public SSLServerConfiguration()
        Constructor for SSLServerConfiguration
    • Method Detail

      • setTrustAnyCertificate

        public SSLServerConfiguration setTrustAnyCertificate​(java.lang.Boolean trustAnyCertificate)
        Set the trust any certificate
        Parameters:
        trustAnyCertificate - the trust any certificate
        Returns:
        this instance
      • setTrustKeyStoreFile

        public SSLServerConfiguration setTrustKeyStoreFile​(java.lang.String trustKeyStoreFile)
        Set the trust key store file
        Parameters:
        trustKeyStoreFile - the trust key store file
        Returns:
        this instance
      • setKeyStoreFile

        public SSLServerConfiguration setKeyStoreFile​(java.lang.String keyStoreFile)
        Set the key store file
        Parameters:
        keyStoreFile - the key store file
        Returns:
        this instance
      • setKeyStoreAlias

        public SSLServerConfiguration setKeyStoreAlias​(java.lang.String keyStoreAlias)
        Set the key store alias
        Parameters:
        keyStoreAlias - the key store alias
        Returns:
        this instance
      • setKeyStorePassword

        public SSLServerConfiguration setKeyStorePassword​(com.github.toolarium.common.security.ISecuredValue<java.lang.String> keyStorePassword)
        Set the key store password
        Parameters:
        keyStorePassword - the key store password
        Returns:
        this instance
      • setKeyStoreType

        public SSLServerConfiguration setKeyStoreType​(java.lang.String keysStoreType)
        Set the key store type
        Parameters:
        keysStoreType - the key store type
        Returns:
        this instance
      • getSSLContext

        public javax.net.ssl.SSLContext getSSLContext()
                                               throws java.security.GeneralSecurityException,
                                                      java.io.IOException
        Description copied from interface: ISSLServerConfiguration
        Get the SSL context
        Specified by:
        getSSLContext in interface ISSLServerConfiguration
        Returns:
        the ssl context or null
        Throws:
        java.security.GeneralSecurityException - In case a self-signbed certificate can't be created
        java.io.IOException - In case a file can't be accessed
        See Also:
        ISSLServerConfiguration.getSSLContext()
      • getSecurityManagerProvider

        public com.github.toolarium.security.keystore.ISecurityManagerProvider getSecurityManagerProvider()
                                                                                                   throws java.security.GeneralSecurityException,
                                                                                                          java.io.IOException
        Get the security manager provider
        Returns:
        the security manager provider
        Throws:
        java.io.IOException - In case a file can't be accessed
        java.security.GeneralSecurityException - In case a self-signbed certificate can't be created
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • toString

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