public interface HostnameVerifier
在握手,如果URL中的主机名和服务器的主机名匹配识别,验证机制可以打后卫这个接口实现来确定是否应该允许这个连接。
该策略可以是基于证书的或可能取决于其他身份验证方案。
这些回调函数时使用的URL主机名验证默认规则失败。
Modifier and Type | Method and Description |
---|---|
boolean |
verify(String hostname, SSLSession session)
确认主机名称是一个可接受的与服务器的认证方案相匹配。
|
boolean verify(String hostname, SSLSession session)
hostname
-主机名
session
-用于连接到主机sslsession
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.