public interface

HostnameVerifier

com.sun.net.ssl.HostnameVerifier

This interface is deprecated.
As of JDK 1.4, this implementation-specific class was replaced by HostnameVerifier and javax.net.ssl.CertificateHostnameVerifier.

Class Overview

HostnameVerifier provides a callback mechanism so that implementers of this interface can supply a policy for handling the case where the host to connect to and the server name from the certificate mismatch.

Summary

Public Methods
abstract boolean verify(String urlHostname, String certHostname)
Verify that the hostname from the URL is an acceptable match with the value from the common name entry in the server certificate's distinguished name.

Public Methods

public abstract boolean verify (String urlHostname, String certHostname)

Verify that the hostname from the URL is an acceptable match with the value from the common name entry in the server certificate's distinguished name.

Parameters
urlHostname the host name of the URL
certHostname the common name entry from the certificate
Returns
  • true if the certificate host name is acceptable