HostnameVerifier 。
@Deprecated public interface X509HostnameVerifier extends HostnameVerifier
HostnameVerifier ,但建议使用X509HostnameVerifier添加的方法。
| Modifier and Type | Method and Description |
|---|---|
void |
verify(String host, SSLSocket ssl)
已过时。
根据给定的 SSLSocket验证主机名是否与服务器认证方案可接受的匹配。
|
void |
verify(String host, String[] cns, String[] subjectAlts)
已过时。
检查提供的主机名是否匹配任何提供的CN或“DNS”主题。
|
void |
verify(String host, X509Certificate cert)
已过时。
根据给定的 X509Certificate验证主机名是否与服务器认证方案可接受的匹配。
|
verifyvoid verify(String host, SSLSocket ssl) throws IOException
SSLSocket验证主机名是否与服务器认证方案可接受的匹配。
host - 主机。
ssl - SSL套接字。
IOException - 如果发生I / O错误或验证过程失败。
void verify(String host, X509Certificate cert) throws SSLException
X509Certificate验证主机名是否与服务器认证方案可接受的匹配。
host - 主机。
cert - 证书。
SSLException - 验证过程是否失败。
void verify(String host, String[] cns, String[] subjectAlts) throws SSLException
cns - 从X.509证书中提取的CN字段。
subjectAlts - 从X.509证书中提取的类型2(“DNS”)的Subject-Alt字段。
host - 要验证的主机名。
SSLException - 验证过程是否失败。
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.