Package org.graylog2.security
Class TrustAllX509TrustManager
java.lang.Object
org.graylog2.security.TrustAllX509TrustManager
- All Implemented Interfaces:
TrustManager
,X509TrustManager
This TrustManager will blindly accept any certificate, useful only if you operate in a trusted environment where
the risk of MITM attacks is low, but you still want to prevent clear text connections to protect against
casual network sniffing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkClientTrusted
(X509Certificate[] x509Certificates, String s) void
checkServerTrusted
(X509Certificate[] x509Certificates, String s)
-
Constructor Details
-
TrustAllX509TrustManager
public TrustAllX509TrustManager()
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException - Specified by:
checkClientTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException - Specified by:
checkServerTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
getAcceptedIssuers
- Specified by:
getAcceptedIssuers
in interfaceX509TrustManager
-