Package org.jivesoftware.smack.util
Class TLSUtils.AcceptAllTrustManager
- java.lang.Object
-
- org.jivesoftware.smack.util.TLSUtils.AcceptAllTrustManager
-
- All Implemented Interfaces:
TrustManager,X509TrustManager
- Enclosing class:
- TLSUtils
public static class TLSUtils.AcceptAllTrustManager extends Object implements X509TrustManager
AX509TrustManagerthat doesn't validate X.509 certificates.Connections that use this TrustManager will just be encrypted, without any guarantee that the counter part is actually the intended one. Man-in-the-Middle attacks will be possible, since any certificate presented by the attacker will be considered valid.
-
-
Constructor Summary
Constructors Constructor Description AcceptAllTrustManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckClientTrusted(X509Certificate[] arg0, String arg1)voidcheckServerTrusted(X509Certificate[] arg0, String arg1)X509Certificate[]getAcceptedIssuers()
-
-
-
Constructor Detail
-
AcceptAllTrustManager
public AcceptAllTrustManager()
-
-
Method Detail
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException
- Specified by:
checkClientTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException
- Specified by:
checkServerTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuersin interfaceX509TrustManager
-
-