Package org.apache.http.ssl
Class SSLContexts
java.lang.Object
org.apache.http.ssl.SSLContexts
SSLContext factory methods.- Since:
- 4.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SSLContextCreates default factory based on the standard JSSE trust material (cacertsfile in the security properties directory).static SSLContextCreates default SSL context based on system properties.static SSLContextBuildercustom()Creates custom SSL context.
-
Constructor Details
-
SSLContexts
public SSLContexts()
-
-
Method Details
-
createDefault
Creates default factory based on the standard JSSE trust material (cacertsfile in the security properties directory). System properties are not taken into consideration.- Returns:
- the default SSL socket factory
- Throws:
SSLInitializationException
-
createSystemDefault
Creates default SSL context based on system properties. This method obtains default SSL context by callingSSLContext.getInstance("Default"). Please note thatDefaultalgorithm is supported as of Java 6. This method will fall back ontocreateDefault()whenDefaultalgorithm is not available.- Returns:
- default system SSL context
- Throws:
SSLInitializationException
-
custom
Creates custom SSL context.- Returns:
- default system SSL context
-