Package org.apache.hc.core5.ssl
Class SSLContexts
- java.lang.Object
-
- org.apache.hc.core5.ssl.SSLContexts
-
public final class SSLContexts extends java.lang.ObjectSSLContextfactory 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 Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static javax.net.ssl.SSLContextcreateDefault()Returns the JDK defaultSSLContext.static javax.net.ssl.SSLContextcreateSystemDefault()Deprecated.CallcreateDefault()insteadstatic SSLContextBuildercustom()Creates custom SSL context.
-
-
-
Method Detail
-
createDefault
public static javax.net.ssl.SSLContext createDefault() throws SSLInitializationExceptionReturns the JDK defaultSSLContext.- Returns:
- the default JDK SSL context
- Throws:
SSLInitializationException- if NoSuchAlgorithmException is thrown when invokingSSLContext.getInstance(String)
-
createSystemDefault
@Deprecated public static javax.net.ssl.SSLContext createSystemDefault() throws SSLInitializationExceptionDeprecated.CallcreateDefault()insteadDeprecated alias forcreateDefault().- Returns:
- the default JDK SSL context
- Throws:
SSLInitializationException- if NoSuchAlgorithmException is thrown when invokingSSLContext.getInstance(String)
-
custom
public static SSLContextBuilder custom()
Creates custom SSL context.- Returns:
- default system SSL context
-
-