Class SslUtil


  • public abstract class SslUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_SSL_PROTOCOL  
    • Constructor Summary

      Constructors 
      Constructor Description
      SslUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SslConfig configureUsingTrustManagerFactory()
      Configure an SSLContext and X509TrustManager with TLSv1.2 as the default protocol and the default algorithm of TrustManagerFactory.
      static SslConfig configureUsingTrustManagerFactory​(java.lang.String protocol, java.lang.String algorithm)
      Configure an SSLContext and X509TrustManager with the given inputs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_SSL_PROTOCOL

        public static final java.lang.String DEFAULT_SSL_PROTOCOL
        See Also:
        Constant Field Values
    • Constructor Detail

      • SslUtil

        public SslUtil()
    • Method Detail

      • configureUsingTrustManagerFactory

        public static SslConfig configureUsingTrustManagerFactory()
        Configure an SSLContext and X509TrustManager with TLSv1.2 as the default protocol and the default algorithm of TrustManagerFactory.
        Returns:
        an SslConfig object based on default settings
      • configureUsingTrustManagerFactory

        public static SslConfig configureUsingTrustManagerFactory​(java.lang.String protocol,
                                                                  java.lang.String algorithm)
        Configure an SSLContext and X509TrustManager with the given inputs.
        Parameters:
        protocol - the protocol to use when getting an instance of an SSLContext
        algorithm - an optional algorithm to use for getting an instance of TrustManagerFactory; if not specified, the default algorithm of TrustManagerFactory is used
        Returns:
        an SslConfig based on the given inputs