public class SslTrustAll extends Object
| Modifier and Type | Field and Description |
|---|---|
static HostnameVerifier |
HOSTNAME_VERIFIER |
static SSLContext |
SSL_CONTEXT |
static SSLSocketFactory |
SSL_SOCKET_FACTORY |
static X509TrustManager |
X509_TRUST_MANAGER |
| Constructor and Description |
|---|
SslTrustAll() |
| Modifier and Type | Method and Description |
|---|---|
static void |
resetHostnameVerifier()
reset HttpsURLConnection.setDefaultHostnameVerifier to system default
|
static void |
resetSocketFactory()
reset HttpsURLConnection.setDefaultSSLSocketFactory to system default
|
static void |
trustHostnameVerifier(String... hostname)
set HttpsURLConnection.setDefaultHostnameVerifier to HOSTNAME_VERIFIER
|
static void |
trustSocketFactory()
set HttpsURLConnection.setDefaultSSLSocketFactory to SSL_SOCKET_FACTORY
|
public static final SSLSocketFactory SSL_SOCKET_FACTORY
public static final X509TrustManager X509_TRUST_MANAGER
public static final SSLContext SSL_CONTEXT
public static final HostnameVerifier HOSTNAME_VERIFIER
public static void resetSocketFactory()
public static void trustSocketFactory()
public static void resetHostnameVerifier()
public static void trustHostnameVerifier(String... hostname)
hostname - trusted hostname, eg. www.moilioncircle.comCopyright © 2023. All rights reserved.