Top Description Constructors Methods
org.apache.http.ssl

public Class SSLContexts

extends Object
Class Inheritance
Imports
java.security.KeyManagementException, .NoSuchAlgorithmException, javax.net.ssl.SSLContext

javax.net.ssl.SSLContext factory methods.
Since
4.4

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static SSLContext

Returns:

the default SSL socket factory
createDefault
()

Creates default factory based on the standard JSSE trust material (cacerts file in the security properties directory).

public static SSLContext

Returns:

default system SSL context
createSystemDefault
()

Creates default SSL context based on system properties.

public static SSLContextBuilder

Returns:

default system SSL context
custom
()

Creates custom SSL context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SSLContextsback to summary
public SSLContexts()

Method Detail

createDefaultback to summary
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:SSLContext

the default SSL socket factory

createSystemDefaultback to summary
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:SSLContext

default system SSL context

customback to summary
public static SSLContextBuilder custom()

Creates custom SSL context.

Returns:SSLContextBuilder

default system SSL context