public class SSLConfig extends 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.
| Constructor and Description |
|---|
SSLConfig() |
| Modifier and Type | Method and Description |
|---|---|
static void |
apply(HttpsURLConnection conn)
Apply security settings to an
HttpsURLConnection. |
static SSLSocketFactory |
getSSLSocketFactory() |
public static void apply(HttpsURLConnection conn) throws SSLException
HttpsURLConnection. Make sure you
haven't called URLConnection.connect() yet.SSLExceptionpublic static SSLSocketFactory getSSLSocketFactory()
Copyright © 2014. All rights reserved.