Class SSLContexts


  • public final class SSLContexts
    extends java.lang.Object
    SSLContext factory methods.

    Please note: the default Oracle JSSE implementation of SSLContext#init(KeyManager[], TrustManager[], SecureRandom) accepts multiple key and trust managers, however only only first matching type is ever used. See for example: SSLContext.html#init

    Since:
    4.4
    • Method Detail

      • createDefault

        public static javax.net.ssl.SSLContext createDefault()
                                                      throws SSLInitializationException
        Returns the JDK default SSLContext.
        Returns:
        the default JDK SSL context
        Throws:
        SSLInitializationException - if NoSuchAlgorithmException is thrown when invoking SSLContext.getInstance(String)
      • custom

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