org.datamanager.simpleton
Class DummyTrustManager
java.lang.Object
|
+--org.datamanager.simpleton.DummyTrustManager
- All Implemented Interfaces:
- TrustManager, X509TrustManager
- public class DummyTrustManager
- extends Object
- implements X509TrustManager
A simple TrustManager implementation that accepts
all certificates without validation.
Taken from
http://www.javaworld.com/javatips/jw-javatip115.html
Java Tip 115: Secure JavaMail with JSSE
Add secure, SSL-based connections to JavaMail
By Eugen Kuleshov and Dmitry I. Platonoff
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DummyTrustManager
public DummyTrustManager()
isClientTrusted
public boolean isClientTrusted(X509Certificate[] cert)
isServerTrusted
public boolean isServerTrusted(X509Certificate[] cert)
getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuers
in interface X509TrustManager
checkClientTrusted
public void checkClientTrusted(X509Certificate[] p0,
String p1)
throws CertificateException
- Specified by:
checkClientTrusted
in interface X509TrustManager
CertificateException
checkServerTrusted
public void checkServerTrusted(X509Certificate[] p0,
String p1)
throws CertificateException
- Specified by:
checkServerTrusted
in interface X509TrustManager
CertificateException
See the Helium Website