Condividi tramite


X509TrustManagerExtensions.CheckServerTrusted Method

Definition

Verifies the given certificate chain.

[Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual System.Collections.Generic.IList<Java.Security.Cert.X509Certificate>? CheckServerTrusted (Java.Security.Cert.X509Certificate[]? chain, string? authType, string? host);
[<Android.Runtime.Register("checkServerTrusted", "([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;", "GetCheckServerTrusted_arrayLjava_security_cert_X509Certificate_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member CheckServerTrusted : Java.Security.Cert.X509Certificate[] * string * string -> System.Collections.Generic.IList<Java.Security.Cert.X509Certificate>
override this.CheckServerTrusted : Java.Security.Cert.X509Certificate[] * string * string -> System.Collections.Generic.IList<Java.Security.Cert.X509Certificate>

Parameters

chain
X509Certificate[]
authType
String
host
String

Returns

the properly ordered chain used for verification as a list of X509Certificates.

Attributes

Exceptions

if the chain does not verify correctly.

Remarks

Verifies the given certificate chain.

See X509TrustManager#checkServerTrusted(X509Certificate[], String) for a description of the chain and authType parameters. The final parameter, host, should be the hostname of the server.

Java documentation for android.net.http.X509TrustManagerExtensions.checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, 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