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
A
X509TrustManager that 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] arg0, String arg1) voidcheckServerTrusted(X509Certificate[] arg0, String arg1)
-
Constructor Details
-
AcceptAllTrustManager
public AcceptAllTrustManager()
-
-
Method Details
-
checkClientTrusted
- Specified by:
checkClientTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
checkServerTrusted
- Specified by:
checkServerTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
getAcceptedIssuers
- Specified by:
getAcceptedIssuersin interfaceX509TrustManager
-