Added in API level 1

HostnameVerifier

public interface HostnameVerifier

javax.net.ssl.HostnameVerifier
AbstractVerifier This class was deprecated in API level 22. Please use URL.openConnection() instead. Please visit this webpage for further details. 
AllowAllHostnameVerifier This class was deprecated in API level 22. Please use URL.openConnection() instead. Please visit this webpage for further details. 
BrowserCompatHostnameVerifier This class was deprecated in API level 22. Please use URL.openConnection() instead. Please visit this webpage for further details. 
StrictHostnameVerifier This class was deprecated in API level 22. Please use URL.openConnection() instead. Please visit this webpage for further details. 
X509HostnameVerifier This interface was deprecated in API level 22. Please use URL.openConnection() instead. Please visit this webpage for further details. 


This class is the base interface for hostname verification.

During handshaking, the verification mechanism can call back to implementers of this interface to determine if this connection should be allowed.

For more information of the use of this interface on Android, see HttpsURLConnection.setDefaultHostnameVerifier(HostnameVerifier).

The policies can be certificate-based or may depend on other authentication schemes.

Summary

Public methods

abstract boolean verify(String hostname, SSLSession session)

Verify that the host name is an acceptable match with the server's authentication scheme.

Public methods

verify

Added in API level 1
public abstract boolean verify (String hostname, 
                SSLSession session)

Verify that the host name is an acceptable match with the server's authentication scheme.

Parameters
hostname String: the host name

session SSLSession: SSLSession used on the connection to host

Returns
boolean true if the host name is acceptable