Language

IX509HostnameVerifier.Verify Method

Definition

Overloads

Name Description
Verify(String, X509Certificate)
Obsolete.

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

Verify(String, ISSLSession)
Obsolete.

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

Verify(String, SSLSocket)
Obsolete.

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

Verify(String, String[], String[])
Obsolete.

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

Verify(String, X509Certificate)

Caution

deprecated

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")]
[System.Obsolete("deprecated")]
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")>]
[<System.Obsolete("deprecated")>]
abstract member Verify : string * Java.Security.Cert.X509Certificate -> unit

Parameters

host
String

The hostname to verify.

cert
X509Certificate

The certificate whose names are verified.

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 based on work created and shared by the Apache Software Foundation and used under the terms of the Apache License, Version 2.0.

Applies to

Verify(String, ISSLSession)

Caution

deprecated

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")]
[System.Obsolete("deprecated")]
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")>]
[<System.Obsolete("deprecated")>]
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

true if the hostname is an acceptable match for the server authentication scheme; otherwise, false.

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 based on work created and shared by the Apache Software Foundation and used under the terms of the Apache License, Version 2.0.

Applies to

Verify(String, SSLSocket)

Caution

deprecated

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")]
[System.Obsolete("deprecated")]
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")>]
[<System.Obsolete("deprecated")>]
abstract member Verify : string * Javax.Net.Ssl.SSLSocket -> unit

Parameters

host
String

The hostname to verify.

ssl
SSLSocket

The SSL socket whose peer certificate is verified.

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 based on work created and shared by the Apache Software Foundation and used under the terms of the Apache License, Version 2.0.

Applies to

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

Caution

deprecated

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")]
[System.Obsolete("deprecated")]
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")>]
[<System.Obsolete("deprecated")>]
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 based on work created and shared by the Apache Software Foundation and used under the terms of the Apache License, Version 2.0.

Applies to