Android APIs
Added in API level 1
public interface

X509TrustManager

implements TrustManager
javax.net.ssl.X509TrustManager

Class Overview

The trust manager for X509 certificates to be used to perform authentication for secure sockets.

Summary

Public Methods
abstract void checkClientTrusted(X509Certificate[] chain, String authType)
Checks whether the specified certificate chain (partial or complete) can be validated and is trusted for client authentication for the specified authentication type.
abstract void checkServerTrusted(X509Certificate[] chain, String authType)
Checks whether the specified certificate chain (partial or complete) can be validated and is trusted for server authentication for the specified key exchange algorithm.
abstract X509Certificate[] getAcceptedIssuers()
Returns the list of certificate issuer authorities which are trusted for authentication of peers.

Public Methods

public abstract void checkClientTrusted (X509Certificate[] chain, String authType)

Added in API level 1

Checks whether the specified certificate chain (partial or complete) can be validated and is trusted for client authentication for the specified authentication type.

Parameters
chain X509Certificate: the certificate chain to validate.
authType String: the authentication type used.
Throws
CertificateException if the certificate chain can't be validated or isn't trusted.
IllegalArgumentException if the specified certificate chain is empty or null, or if the specified authentication type is null or an empty string.

public abstract void checkServerTrusted (X509Certificate[] chain, String authType)

Added in API level 1

Checks whether the specified certificate chain (partial or complete) can be validated and is trusted for server authentication for the specified key exchange algorithm.

Parameters
chain X509Certificate: the certificate chain to validate.
authType String: the key exchange algorithm name.
Throws
CertificateException if the certificate chain can't be validated or isn't trusted.
IllegalArgumentException if the specified certificate chain is empty or null, or if the specified authentication type is null or an empty string.

public abstract X509Certificate[] getAcceptedIssuers ()

Added in API level 1

Returns the list of certificate issuer authorities which are trusted for authentication of peers.

Returns
X509Certificate[] the list of certificate issuer authorities which are trusted for authentication of peers.