javax.net.ssl
Interface HostnameVerifier
java.lang.Object
|
+--javax.net.ssl.HostnameVerifier
public interface HostnameVerifier
The interface for classes that perform hostname verification for cases
when the hostname used to begin the connection (such as in a URL)
does not match the hostname used in the SSL handshake.
Implementations of this interface should provide an implementation
of the #verify(java.lang.String,javax.net.ssl.SSLSession)
method that accepts or rejects hostnames as appropriate.
Author:- Casey Marshall (rsdio@metastatic.org)
verify
public boolean verify(String hostname, javax.net.ssl.SSLSession session)
Verifies a hostname given a particular SSL session. This method
should return true if the hostname is an accepted
alias for the hostname negotiated in the SSL handshake.
Parameters:
Returns:
- true if the hostname is acceptable.