@Immutable public class SSLContexts extends java.lang.Object
SSLContext factory methods.| 构造器和说明 |
|---|
SSLContexts() |
| 限定符和类型 | 方法和说明 |
|---|---|
static javax.net.ssl.SSLContext |
createDefault()
Creates default factory based on the standard JSSE trust material
(
cacerts file in the security properties directory). |
static javax.net.ssl.SSLContext |
createSystemDefault()
Creates default SSL context based on system properties.
|
static SSLContextBuilder |
custom()
Creates custom SSL context.
|
public static javax.net.ssl.SSLContext createDefault()
throws SSLInitializationException
cacerts file in the security properties directory). System properties
are not taken into consideration.SSLInitializationExceptionpublic static javax.net.ssl.SSLContext createSystemDefault()
throws SSLInitializationException
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.SSLInitializationExceptionpublic static SSLContextBuilder custom()