Added in API level 1

HostnameVerifier

interface HostnameVerifier
X509HostnameVerifier

Interface for checking if a hostname matches the names stored inside the server's X.

AbstractVerifier

Abstract base class for all standard X509HostnameVerifier implementations.

AllowAllHostnameVerifier

The ALLOW_ALL HostnameVerifier essentially turns hostname verification off.

BrowserCompatHostnameVerifier

The HostnameVerifier that works the same way as Curl and Firefox.

StrictHostnameVerifier

The Strict HostnameVerifier works the same way as Sun Java 1.

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(hostname: String!, session: SSLSession!)

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

Public methods

verify

Added in API level 1
abstract fun verify(
    hostname: String!,
    session: SSLSession!
): Boolean

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
Return
Boolean true if the host name is acceptable