Skip to content

Instantly share code, notes, and snippets.

@jensjaeger
jensjaeger / SSLUtilities.java
Created Dec 31, 2013
This class provide various static methods that relax X509 certificate and hostname verification while using the SSL over the HTTP protocol. Copied from: http://schrepfler.blogspot.com.br/2009/06/relaxing-ssl-validation-for-jaxws.html
View SSLUtilities.java
package util;
/**
*
*/
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.HostnameVerifier;