public final class SSLUtilities extends Object
Call: SSLUtilities.trustAllHostnames() to turn off the default hostname verification on HTTPS connection; SSLUtilities.trustAllHttpsCertificates() to turn off the default certificate validation on HTTPS connection. SSLUtilities.stopTrustingAllHttpsCertificates() to stop trusting all hosts' certificates and go back to default Java settings.
Modifier and Type | Class and Description |
---|---|
static class |
SSLUtilities.FakeHostnameVerifier
This class implements a fake hostname verificator, trusting any host
name.
|
static class |
SSLUtilities.FakeX509TrustManager
This class allow any X509 certificates to be used to authenticate the
remote side of a secure socket, including self-signed certificates.
|
Constructor and Description |
---|
SSLUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
stopTrustingAllHttpsCertificates()
Stop trusting all certificates and go back to the default settings.
|
static void |
trustAllHostnames()
Set the default Hostname Verifier to an instance of a fake class that
trust all hostnames.
|
static void |
trustAllHttpsCertificates()
Set the default X509 Trust Manager to an instance of a fake class that
trust all certificates, even the self-signed ones.
|
public static void trustAllHostnames()
public static void trustAllHttpsCertificates()
public static void stopTrustingAllHttpsCertificates()
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.