org.eaglei.model.webapp.server.email
Class SSLUtilities

java.lang.Object
  extended by org.eaglei.model.webapp.server.email.SSLUtilities

public final class SSLUtilities
extends java.lang.Object

Author:
Ricardo De Lima Feb 11, 2010 Center for Biomedical Informatics (CBMI) This class provide various static methods that relax X509 certificate and hostname verification while using the SSL over the HTTP protocol. Originally from Francis Labrie: http://en.wikibooks.org/wiki/WebObjects/Web_Services/How_to_Trust_Any_SSL_Certificate NB: uses lots of com.sun stuff, but that's the price we pay for the workaround of all workarounds.

Nested Class Summary
static class SSLUtilities._FakeHostnameVerifier
          Deprecated. see SSLUtilities.FakeHostnameVerifier.
static class SSLUtilities._FakeX509TrustManager
          Deprecated. see SSLUtilities.FakeX509TrustManager.
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 Summary
SSLUtilities()
           
 
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
 

Constructor Detail

SSLUtilities

public SSLUtilities()
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 © 2009-2010 Eagle-I. All Rights Reserved.