DefaultHostnameVerifier
@Contract(threading=IMMUTABLE) @Deprecated public class BrowserCompatHostnameVerifier extends AbstractVerifier
主机名必须与第一个CN或任何主题匹配。 通配符可以在CN和任何主题中发生。
BROWSER_COMPATIBLE和STRICT的唯一区别是BROWSER_COMPATIBLE的通配符(例如“* .foo.com”)与所有子域(包括“abfoo.com”)相匹配。
| Modifier and Type | Field and Description |
|---|---|
static BrowserCompatHostnameVerifier |
INSTANCE
已过时。
|
| Constructor and Description |
|---|
BrowserCompatHostnameVerifier()
已过时。
|
| Modifier and Type | Method and Description |
|---|---|
String |
toString()
已过时。
|
void |
verify(String host, String[] cns, String[] subjectAlts)
已过时。
检查提供的主机名是否匹配任何提供的CN或“DNS”主题。
|
acceptableCountryWildcard, countDots, getCNs, getDNSSubjectAlts, verify, verify, verify, verifypublic static final BrowserCompatHostnameVerifier INSTANCE
public final void verify(String host, String[] cns, String[] subjectAlts) throws SSLException
X509HostnameVerifier复制
host - 要验证的主机名。
cns - 从X.509证书中提取的CN字段。
subjectAlts - 从X.509证书中提取的类型2(“DNS”)的Subject-Alt字段。
SSLException - 如果验证过程失败。
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.