Udostępnij za pośrednictwem


IX509HostnameVerifier.Verify Method

Definition

Overloads

Verify(String, X509Certificate)

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

Verify(String, ISSLSession)

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

Verify(String, SSLSocket)

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

Verify(String, String[], String[])

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

Verify(String, X509Certificate)

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

[Android.Runtime.Register("verify", "(Ljava/lang/String;Ljava/security/cert/X509Certificate;)V", "GetVerify_Ljava_lang_String_Ljava_security_cert_X509Certificate_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Verify (string? host, Java.Security.Cert.X509Certificate? cert);
[<Android.Runtime.Register("verify", "(Ljava/lang/String;Ljava/security/cert/X509Certificate;)V", "GetVerify_Ljava_lang_String_Ljava_security_cert_X509Certificate_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Verify : string * Java.Security.Cert.X509Certificate -> unit

Parameters

host
String

The hostname to verify.

Attributes

Exceptions

Remarks

Java documentation for org.apache.http.conn.ssl.X509HostnameVerifier.verify(java.lang.String, 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

Verify(String, ISSLSession)

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

[Android.Runtime.Register("verify", "(Ljava/lang/String;Ljavax/net/ssl/SSLSession;)Z", "GetVerify_Ljava_lang_String_Ljavax_net_ssl_SSLSession_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Verify (string? host, Javax.Net.Ssl.ISSLSession? session);
[<Android.Runtime.Register("verify", "(Ljava/lang/String;Ljavax/net/ssl/SSLSession;)Z", "GetVerify_Ljava_lang_String_Ljavax_net_ssl_SSLSession_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Verify : string * Javax.Net.Ssl.ISSLSession -> bool

Parameters

host
String

The hostname to verify.

session
ISSLSession

the SSL session of the connection.

Returns

Implements

Attributes

Remarks

Java documentation for org.apache.http.conn.ssl.X509HostnameVerifier.verify(java.lang.String, 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

Verify(String, SSLSocket)

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

[Android.Runtime.Register("verify", "(Ljava/lang/String;Ljavax/net/ssl/SSLSocket;)V", "GetVerify_Ljava_lang_String_Ljavax_net_ssl_SSLSocket_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Verify (string? host, Javax.Net.Ssl.SSLSocket? ssl);
[<Android.Runtime.Register("verify", "(Ljava/lang/String;Ljavax/net/ssl/SSLSocket;)V", "GetVerify_Ljava_lang_String_Ljavax_net_ssl_SSLSocket_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Verify : string * Javax.Net.Ssl.SSLSocket -> unit

Parameters

host
String

The hostname to verify.

ssl
SSLSocket
Attributes

Exceptions

Remarks

Java documentation for org.apache.http.conn.ssl.X509HostnameVerifier.verify(java.lang.String, 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

Verify(String, String[], String[])

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts.

[Android.Runtime.Register("verify", "(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V", "GetVerify_Ljava_lang_String_arrayLjava_lang_String_arrayLjava_lang_String_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Verify (string? host, string[]? cns, string[]? subjectAlts);
[<Android.Runtime.Register("verify", "(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V", "GetVerify_Ljava_lang_String_arrayLjava_lang_String_arrayLjava_lang_String_Handler:Org.Apache.Http.Conn.Ssl.IX509HostnameVerifierInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Verify : string * string[] * string[] -> unit

Parameters

host
String

The hostname to verify.

cns
String[]

CN fields, in order, as extracted from the X.509 certificate.

subjectAlts
String[]

Subject-Alt fields of type 2 ("DNS"), as extracted from the X.509 certificate.

Attributes

Exceptions

If verification failed.

Remarks

Checks to see if the supplied hostname matches any of the supplied CNs or "DNS" Subject-Alts. Most implementations only look at the first CN, and ignore any additional CNs. Most implementations do look at all of the "DNS" Subject-Alts. The CNs or Subject-Alts may contain wildcards according to RFC 2818.

Java documentation for org.apache.http.conn.ssl.X509HostnameVerifier.verify(java.lang.String, 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