DefaultHostnameVerifier
@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.
|
BAD_COUNTRY_2LDS
Constructor and Description |
---|
BrowserCompatHostnameVerifier()
Deprecated.
|
Modifier and Type | Method and 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, verify
public static final BrowserCompatHostnameVerifier INSTANCE
public final void verify(java.lang.String host, java.lang.String[] cns, java.lang.String[] subjectAlts) throws javax.net.ssl.SSLException
X509HostnameVerifier
host
- 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