java.lang.Object
javax.net.ssl.X509ExtendedTrustManager
nl.altindag.ssl.trustmanager.UnsafeX509ExtendedTrustManager
- All Implemented Interfaces:
TrustManager,X509TrustManager
An insecure
Suppressed warning: java:S4830 - "Server certificates should be verified during SSL/TLS connections" This TrustManager doesn't validate certificates and should not be used at production. It is just meant to be used for testing purposes and it is designed not to verify server certificates.
TrustManager that trusts all X.509 certificates without any verification.
NOTE:
Never use this UnsafeX509ExtendedTrustManager in production.
It is purely for testing purposes, and thus it is very insecure.
Suppressed warning: java:S4830 - "Server certificates should be verified during SSL/TLS connections" This TrustManager doesn't validate certificates and should not be used at production. It is just meant to be used for testing purposes and it is designed not to verify server certificates.
NOTE:
Please don't use this class directly as it is part of the internal API. Class name and methods can be changed any time.
Instead use the TrustManagerUtils which provides the same functionality
while it has a stable API because it is part of the public API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final X509Certificate[]private static final X509ExtendedTrustManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] certificates, String authType) voidcheckClientTrusted(X509Certificate[] certificates, String authType, Socket socket) voidcheckClientTrusted(X509Certificate[] certificates, String authType, SSLEngine sslEngine) voidcheckServerTrusted(X509Certificate[] certificates, String authType) voidcheckServerTrusted(X509Certificate[] certificates, String authType, Socket socket) voidcheckServerTrusted(X509Certificate[] certificates, String authType, SSLEngine sslEngine) static X509ExtendedTrustManager
-
Field Details
-
INSTANCE
-
EMPTY_CERTIFICATES
-
-
Constructor Details
-
UnsafeX509ExtendedTrustManager
private UnsafeX509ExtendedTrustManager()
-
-
Method Details
-
getInstance
-
checkClientTrusted
-
checkClientTrusted
- Specified by:
checkClientTrustedin classX509ExtendedTrustManager
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] certificates, String authType, SSLEngine sslEngine) - Specified by:
checkClientTrustedin classX509ExtendedTrustManager
-
checkServerTrusted
-
checkServerTrusted
- Specified by:
checkServerTrustedin classX509ExtendedTrustManager
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] certificates, String authType, SSLEngine sslEngine) - Specified by:
checkServerTrustedin classX509ExtendedTrustManager
-
getAcceptedIssuers
-