@Contract(threading=STATELESS) public final class DefaultHostnameVerifier extends Object implements HttpClientHostnameVerifier
HostnameVerifier implementation.| Constructor and Description |
|---|
DefaultHostnameVerifier()
Constructs new instance without a PublicSuffixMatcher.
|
DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher)
Constructs new instance with a PublicSuffixMatcher.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
verify(String host,
SSLSession session) |
void |
verify(String host,
X509Certificate cert)
Verifies the supplied server
X509Certificate and ensures it matches
the original host name. |
public DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher)
publicSuffixMatcher - a PublicSuffixMatcher.public DefaultHostnameVerifier()
public boolean verify(String host, SSLSession session)
verify in interface HostnameVerifierpublic void verify(String host, X509Certificate cert) throws SSLException
HttpClientHostnameVerifierX509Certificate and ensures it matches
the original host name.verify in interface HttpClientHostnameVerifierhost - the original host name.cert - the server certificate;SSLExceptionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.