org.equanda.util.security
Class SslUtil

java.lang.Object
  extended by org.equanda.util.security.SslUtil

public final class SslUtil
extends Object

SSL utilities

Author:
Joachim Van der Auwera

Nested Class Summary
static class SslUtil.AllowAllHostnameVerifier
          This class implements a fake hostname verificator, trusting any host name.
static class SslUtil.TrustAllX509TrustManager
          This class allow any X509 certificates to be used to authenticate the remote side of a secure socket, including self-signed certificates.
 
Field Summary
static HostnameVerifier HOSTNAME_VERIFIER
           
static TrustManager[] TRUST_MANAGERS
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOSTNAME_VERIFIER

public static final HostnameVerifier HOSTNAME_VERIFIER

TRUST_MANAGERS

public static final TrustManager[] TRUST_MANAGERS
Method Detail

trustAllHostnames

public static void trustAllHostnames()
Set the default Hostname Verifier to an instance of a fake class that trust all hostnames.


trustAllHttpsCertificates

public 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.



Copyright © 2007-2009. All Rights Reserved.