DefaultHostnameVerifier@Contract(threading=IMMUTABLE) @Deprecated public class BrowserCompatHostnameVerifier extends AbstractVerifier
The hostname must match either the first CN, or any of the subject-alts. A wildcard can occur in the CN, and in any of the subject-alts.
The only difference between BROWSER_COMPATIBLE and STRICT is that a wildcard (such as "*.foo.com") with BROWSER_COMPATIBLE matches all subdomains, including "a.b.foo.com".
| Modifier and Type | Field and Description |
|---|---|
static BrowserCompatHostnameVerifier |
INSTANCE
Deprecated.
|
| Constructor and Description |
|---|
BrowserCompatHostnameVerifier()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
toString()
Deprecated.
|
void |
verify(String host,
String[] cns,
String[] subjectAlts)
Deprecated.
Checks to see if the supplied hostname matches any of the supplied CNs
or "DNS" Subject-Alts.
|
acceptableCountryWildcard, countDots, getCNs, getDNSSubjectAlts, verify, verify, verify, verifypublic static final BrowserCompatHostnameVerifier INSTANCE
public final void verify(String host, String[] cns, String[] subjectAlts) throws SSLException
X509HostnameVerifierhost - The hostname to verify.cns - CN fields, in order, as extracted from the X.509
certificate.subjectAlts - Subject-Alt fields of type 2 ("DNS"), as extracted
from the X.509 certificate.SSLException - if the verification process fails.Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.