javax.net.ssl.HostnameVerifier, X509HostnameVerifierDefaultHostnameVerifier@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 | Description |
|---|---|---|
static BrowserCompatHostnameVerifier |
INSTANCE |
Deprecated.
|
| Constructor | Description |
|---|---|
BrowserCompatHostnameVerifier() |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
toString() |
Deprecated.
|
void |
verify(java.lang.String host,
java.lang.String[] cns,
java.lang.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 BrowserCompatHostnameVerifier()
public final void verify(java.lang.String host,
java.lang.String[] cns,
java.lang.String[] subjectAlts)
throws javax.net.ssl.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.javax.net.ssl.SSLException - if the verification process fails.public final java.lang.String toString()
toString in class java.lang.Object