Compartir a través de


X509ExtendedTrustManager.CheckServerTrusted Method

Definition

Overloads

CheckServerTrusted(X509Certificate[], String)

Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for server SSL authentication based on the authentication type.

CheckServerTrusted(X509Certificate[], String, Socket)

Given the partial or complete certificate chain provided by the peer, build and validate the certificate path based on the authentication type and ssl parameters.

CheckServerTrusted(X509Certificate[], String, SSLEngine)

Given the partial or complete certificate chain provided by the peer, build and validate the certificate path based on the authentication type and ssl parameters.

CheckServerTrusted(X509Certificate[], String)

Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for server SSL authentication based on the authentication type.

[Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;)V", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Handler")]
public abstract void CheckServerTrusted (Java.Security.Cert.X509Certificate[]? chain, string? authType);
[<Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;)V", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Handler")>]
abstract member CheckServerTrusted : Java.Security.Cert.X509Certificate[] * string -> unit

Parameters

chain
X509Certificate[]

the peer certificate chain

authType
String

the key exchange algorithm used

Implements

Attributes

Remarks

Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for server SSL authentication based on the authentication type.

The authentication type is the key exchange algorithm portion of the cipher suites represented as a String, such as "RSA", "DHE_DSS". Note: for some exportable cipher suites, the key exchange algorithm is determined at run time during the handshake. For instance, for TLS_RSA_EXPORT_WITH_RC4_40_MD5, the authType should be RSA_EXPORT when an ephemeral RSA key is used for the key exchange, and RSA when the key from the server certificate is used. Checking is case-sensitive.

Java documentation for javax.net.ssl.X509TrustManager.checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CheckServerTrusted(X509Certificate[], String, Socket)

Given the partial or complete certificate chain provided by the peer, build and validate the certificate path based on the authentication type and ssl parameters.

[Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/net/Socket;)V", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Ljava_net_Socket_Handler", ApiSince=24)]
public abstract void CheckServerTrusted (Java.Security.Cert.X509Certificate[]? chain, string? authType, Java.Net.Socket? socket);
[<Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/net/Socket;)V", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Ljava_net_Socket_Handler", ApiSince=24)>]
abstract member CheckServerTrusted : Java.Security.Cert.X509Certificate[] * string * Java.Net.Socket -> unit

Parameters

chain
X509Certificate[]

the peer certificate chain

authType
String

the key exchange algorithm used

socket
Socket

the socket used for this connection. This parameter can be null, which indicates that implementations need not check the ssl parameters

Attributes

Remarks

Given the partial or complete certificate chain provided by the peer, build and validate the certificate path based on the authentication type and ssl parameters.

The authentication type is the key exchange algorithm portion of the cipher suites represented as a String, such as "RSA", "DHE_DSS". Note: for some exportable cipher suites, the key exchange algorithm is determined at run time during the handshake. For instance, for TLS_RSA_EXPORT_WITH_RC4_40_MD5, the authType should be RSA_EXPORT when an ephemeral RSA key is used for the key exchange, and RSA when the key from the server certificate is used. Checking is case-sensitive.

If the socket parameter is an instance of javax.net.ssl.SSLSocket, and the endpoint identification algorithm of the SSLParameters is non-empty, to prevent man-in-the-middle attacks, the address that the socket connected to should be checked against the peer's identity presented in the end-entity X509 certificate, as specified in the endpoint identification algorithm.

If the socket parameter is an instance of javax.net.ssl.SSLSocket, and the algorithm constraints of the SSLParameters is non-null, for every certificate in the certification path, fields such as subject public key, the signature algorithm, key usage, extended key usage, etc. need to conform to the algorithm constraints in place on this socket.

Java documentation for javax.net.ssl.X509ExtendedTrustManager.checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.net.Socket).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CheckServerTrusted(X509Certificate[], String, SSLEngine)

Given the partial or complete certificate chain provided by the peer, build and validate the certificate path based on the authentication type and ssl parameters.

[Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljavax/net/ssl/SSLEngine;)V", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Ljavax_net_ssl_SSLEngine_Handler", ApiSince=24)]
public abstract void CheckServerTrusted (Java.Security.Cert.X509Certificate[]? chain, string? authType, Javax.Net.Ssl.SSLEngine? engine);
[<Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljavax/net/ssl/SSLEngine;)V", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Ljavax_net_ssl_SSLEngine_Handler", ApiSince=24)>]
abstract member CheckServerTrusted : Java.Security.Cert.X509Certificate[] * string * Javax.Net.Ssl.SSLEngine -> unit

Parameters

chain
X509Certificate[]

the peer certificate chain

authType
String

the key exchange algorithm used

engine
SSLEngine

the engine used for this connection. This parameter can be null, which indicates that implementations need not check the ssl parameters

Attributes

Remarks

Given the partial or complete certificate chain provided by the peer, build and validate the certificate path based on the authentication type and ssl parameters.

The authentication type is the key exchange algorithm portion of the cipher suites represented as a String, such as "RSA", "DHE_DSS". Note: for some exportable cipher suites, the key exchange algorithm is determined at run time during the handshake. For instance, for TLS_RSA_EXPORT_WITH_RC4_40_MD5, the authType should be RSA_EXPORT when an ephemeral RSA key is used for the key exchange, and RSA when the key from the server certificate is used. Checking is case-sensitive.

If the engine parameter is available, and the endpoint identification algorithm of the SSLParameters is non-empty, to prevent man-in-the-middle attacks, the address that the engine connected to should be checked against the peer's identity presented in the end-entity X509 certificate, as specified in the endpoint identification algorithm.

If the engine parameter is available, and the algorithm constraints of the SSLParameters is non-null, for every certificate in the certification path, fields such as subject public key, the signature algorithm, key usage, extended key usage, etc. need to conform to the algorithm constraints in place on this engine.

Java documentation for javax.net.ssl.X509ExtendedTrustManager.checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, javax.net.ssl.SSLEngine).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to