com.sun.net.ssl
Interface HostnameVerifier


public interface HostnameVerifier

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.


Method Summary
 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.
 

Method Detail

verify

public 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