@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 HostnameVerifier
public void verify(String host, X509Certificate cert) throws SSLException
HttpClientHostnameVerifier
X509Certificate
and ensures it matches
the original host name.verify
in interface HttpClientHostnameVerifier
host
- the original host name.cert
- the server certificate;SSLException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.