Class SSLContexts
java.lang.Object
org.apache.hc.core5.ssl.SSLContexts
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SSLContextReturns the JDK defaultSSLContext.static SSLContextDeprecated.static SSLContextBuildercustom()Creates custom SSL context.
-
Constructor Details
-
SSLContexts
private SSLContexts()
-
-
Method Details
-
createDefault
Returns the JDK defaultSSLContext.- Returns:
- the default JDK SSL context
- Throws:
SSLInitializationException- if NoSuchAlgorithmException is thrown when invokingSSLContext.getInstance(String)
-
createSystemDefault
Deprecated.CallcreateDefault()insteadDeprecated alias forcreateDefault().- Returns:
- the default JDK SSL context
- Throws:
SSLInitializationException- if NoSuchAlgorithmException is thrown when invokingSSLContext.getInstance(String)
-
custom
Creates custom SSL context.- Returns:
- default system SSL context
-
createDefault()instead