Class SslConfiguration

    • Field Detail

      • protocol

        private final java.lang.String protocol
      • verifyHostName

        private final boolean verifyHostName
      • sslContext

        private final transient javax.net.ssl.SSLContext sslContext
    • Method Detail

      • clearSecrets

        public void clearSecrets()
        Clears the secret fields in this object but still allow it to operate normally.
      • getSslSocketFactory

        @Deprecated
        public javax.net.ssl.SSLSocketFactory getSslSocketFactory()
        Deprecated.
        Use SSLContext.getSocketFactory() on getSslContext()
        Gets the SSL socket factory of the configured SSL context.
        Returns:
        the SSL socket factory of the configured SSL context
      • getSslServerSocketFactory

        @Deprecated
        public javax.net.ssl.SSLServerSocketFactory getSslServerSocketFactory()
        Deprecated.
        Use SSLContext.getServerSocketFactory() on getSslContext()
        Gets the SSL server socket factory of the configured SSL context.
        Returns:
        the SSL server socket factory of the configured SSL context
      • createDefaultSslContext

        private static javax.net.ssl.SSLContext createDefaultSslContext​(java.lang.String protocol)
      • loadKeyManagers

        private static javax.net.ssl.KeyManager[] loadKeyManagers​(KeyStoreConfiguration config)
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadTrustManagers

        private static javax.net.ssl.TrustManager[] loadTrustManagers​(TrustStoreConfiguration config)
                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createSSLConfiguration

        public static SslConfiguration createSSLConfiguration​(java.lang.String protocol,
                                                              KeyStoreConfiguration keyStoreConfig,
                                                              TrustStoreConfiguration trustStoreConfig)
        Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.
        Parameters:
        protocol - The protocol, see SSLContext Algorithms
        keyStoreConfig - The KeyStoreConfiguration.
        trustStoreConfig - The TrustStoreConfiguration.
        Returns:
        a new SslConfiguration
      • hashCode

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

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

        public java.lang.String getProtocol()
      • isVerifyHostName

        public boolean isVerifyHostName()
      • getSslContext

        public javax.net.ssl.SSLContext getSslContext()