Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

HostnameVerifier

javax.net.ssl.HostnameVerifier
Known Indirect Subclasses

Class Overview

The interface to be used to provide hostname verification functionality.

This is an extended verification option that implementers can provide. It is to be used during a handshake if the URL's hostname does not match the peer's identification hostname.

Summary

Public Methods
abstract boolean verify ( String hostname, SSLSession session)
Verifies that the specified hostname is allowed within the specified SSL session.

Public Methods

public abstract boolean verify ( String hostname, SSLSession session)

Added in API level 1

Verifies that the specified hostname is allowed within the specified SSL session.

Parameters
hostname the hostname.
session the SSL session of the connection.
Returns
  • true if the specified hostname is allowed, otherwise false .