public class SSLConfig
extends java.lang.Object
getSSLSocketFactory() returns a properly configured object that you can use
to create sockets.
If you have an HttpsURLConnection, call the convenience method
apply(HttpsURLConnection) (before calling URLConnection.connect())
to apply the appropriate security settings.
| Modifier and Type | Class and Description |
|---|---|
static class |
SSLConfig.LoadException |
| Constructor and Description |
|---|
SSLConfig() |
| Modifier and Type | Method and Description |
|---|---|
static void |
apply(javax.net.ssl.HttpsURLConnection conn)
Apply security settings to an
HttpsURLConnection. |
static javax.net.ssl.SSLSocketFactory |
getSSLSocketFactory() |
static javax.net.ssl.X509TrustManager |
getTrustManager() |
public static void apply(javax.net.ssl.HttpsURLConnection conn)
throws javax.net.ssl.SSLException
HttpsURLConnection. Make sure you
haven't called URLConnection.connect() yet.javax.net.ssl.SSLExceptionpublic static javax.net.ssl.X509TrustManager getTrustManager()
public static javax.net.ssl.SSLSocketFactory getSSLSocketFactory()