Class SSLContexts


  • public class SSLContexts
    extends Object
    SSLContext factory methods.
    Since:
    4.4
    • Constructor Detail

      • SSLContexts

        public SSLContexts()
    • Method Detail

      • createDefault

        public static SSLContext createDefault()
                                        throws SSLInitializationException
        Creates default factory based on the standard JSSE trust material (cacerts file in the security properties directory). System properties are not taken into consideration.
        Returns:
        the default SSL socket factory
        Throws:
        SSLInitializationException
      • createSystemDefault

        public static SSLContext createSystemDefault()
                                              throws SSLInitializationException
        Creates default SSL context based on system properties. This method obtains default SSL context by calling SSLContext.getInstance("Default"). Please note that Default algorithm is supported as of Java 6. This method will fall back onto createDefault() when Default algorithm is not available.
        Returns:
        default system SSL context
        Throws:
        SSLInitializationException
      • custom

        public static SSLContextBuilder custom()
        Creates custom SSL context.
        Returns:
        default system SSL context