public final class DefaultHostnameVerifier extends Object implements HostnameVerifier
Constructor and Description |
---|
DefaultHostnameVerifier() |
Modifier and Type | Method and Description |
---|---|
boolean |
verify(String host,
SSLSession session)
Verifies that the specified hostname is allowed within the specified SSL
session.
|
boolean |
verify(String host,
X509Certificate certificate) |
boolean |
verifyHostName(String hostName,
String cn)
Returns true if
hostName matches the name or pattern cn . |
public final boolean verify(String host, SSLSession session)
HostnameVerifier
verify
in interface HostnameVerifier
host
- the hostname.session
- the SSL session of the connection.true
if the specified hostname is allowed, otherwise
false
.public boolean verify(String host, X509Certificate certificate)