public final class

DefaultHostnameVerifier

extends Object
implements HostnameVerifier
java.lang.Object
   ↳ sun.net.www.protocol.https.DefaultHostnameVerifier

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. The default implementation will deny such connections.

Summary

Public Constructors
DefaultHostnameVerifier()
Public Methods
boolean verify(String hostname, SSLSession session)
Verify that the host name is an acceptable match with the server's authentication scheme.
[Expand]
Inherited Methods
From class java.lang.Object
From interface javax.net.ssl.HostnameVerifier

Public Constructors

public DefaultHostnameVerifier ()

Public Methods

public boolean verify (String hostname, SSLSession session)

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

Parameters
hostname the host name
session SSLSession used on the connection to host
Returns
  • true if the host name is acceptable