Skip to content

Most visited

Recently visited

navigation
Added in API level 1

X509TrustManager

public interface X509TrustManager
implements TrustManager

javax.net.ssl.X509TrustManager


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

checkClientTrusted

Added in API level 1
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.

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.

checkServerTrusted

Added in API level 1
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.

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.

getAcceptedIssuers

Added in API level 1
X509Certificate[] getAcceptedIssuers ()

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.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.