Top Description Methods
org.apache.http.ssl

public Interface TrustStrategy

Imports
java.security.cert.CertificateException, .X509Certificate

A strategy to establish trustworthiness of certificates without consulting the trust manager configured in the actual SSL context. This interface can be used to override the standard JSSE certificate verification process.
Since
4.4

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the certificate can be trusted without verification by the trust manager, false otherwise.
isTrusted
(X509Certificate[]
the peer certificate chain
chain
,
String
the authentication type based on the client certificate
authType
)

Determines whether the certificate chain can be trusted without consulting the trust manager configured in the actual SSL context.

Method Detail

isTrustedback to summary
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException

Determines whether the certificate chain can be trusted without consulting the trust manager configured in the actual SSL context. This method can be used to override the standard JSSE certificate verification process.

Please note that, if this method returns false, the trust manager configured in the actual SSL context can still clear the certificate as trusted.

Parameters
chain:X509Certificate[]

the peer certificate chain

authType:String

the authentication type based on the client certificate

Returns:boolean

true if the certificate can be trusted without verification by the trust manager, false otherwise.

Exceptions
CertificateException:
thrown if the certificate is not trusted or invalid.