@Contract(threading=STATELESS) public final class DefaultHostnameVerifier extends Object implements HttpClientHostnameVerifier
HostnameVerifier implementation.| Constructor and Description |
|---|
DefaultHostnameVerifier() |
DefaultHostnameVerifier(PublicSuffixMatcher 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)
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–2022 The Apache Software Foundation. All rights reserved.