Package org.apache.hc.client5.http.ssl
Class TrustSelfSignedStrategy
java.lang.Object
org.apache.hc.client5.http.ssl.TrustSelfSignedStrategy
- All Implemented Interfaces:
org.apache.hc.core5.ssl.TrustStrategy
@Deprecated
@Contract(threading=STATELESS)
public class TrustSelfSignedStrategy
extends Object
implements org.apache.hc.core5.ssl.TrustStrategy
Deprecated.
A trust strategy that accepts self-signed certificates as trusted. Verification of all other
certificates is done by the trust manager configured in the SSL context.
Security Warning
This acts likeTrustAllStrategy
, with the only restriction that the certificate chain
must have length 1. This means this trust strategy does not protect against man-in-the-middle
attacks. See the TrustAllStrategy
for more information and more secure alternatives.- Since:
- 4.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isTrusted
(X509Certificate[] chain, String authType) Deprecated.
-
Field Details
-
INSTANCE
Deprecated.
-
-
Constructor Details
-
TrustSelfSignedStrategy
public TrustSelfSignedStrategy()Deprecated.
-
-
Method Details
-
isTrusted
Deprecated.- Specified by:
isTrusted
in interfaceorg.apache.hc.core5.ssl.TrustStrategy
- Throws:
CertificateException
-
SSLContextBuilder
loadTrustMaterial
methods.