public class SslUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static javax.net.ssl.HostnameVerifier |
setTrustingDefaultHostnameVerifier()
Replaces the default HTTPS hostname verifier with one that trusts all
hosts
|
static javax.net.ssl.SSLSocketFactory |
setTrustingDefaultHttpsSocketFactory()
Replaces the default SSLSocketFactory with one that doesn't verify
certificates
|
static void |
setTrustingHttpsOptions(javax.net.ssl.HttpsURLConnection conn)
Replaces the default
TrustManager for this
connection with one that trusts all certificates, and the default
HostnameVerifier with one that accepts all
hostnames. |
public static void setTrustingHttpsOptions(javax.net.ssl.HttpsURLConnection conn)
throws java.security.GeneralSecurityException
TrustManager for this
connection with one that trusts all certificates, and the default
HostnameVerifier with one that accepts all
hostnames.conn - the HTTPS URL connectionjava.security.GeneralSecurityException - if an error occurs setting the propertiespublic static javax.net.ssl.SSLSocketFactory setTrustingDefaultHttpsSocketFactory()
public static javax.net.ssl.HostnameVerifier setTrustingDefaultHostnameVerifier()