Package com.squareup.okhttp.internal.tls
Class OkHostnameVerifier
java.lang.Object
com.squareup.okhttp.internal.tls.OkHostnameVerifier
- All Implemented Interfaces:
HostnameVerifier
public final class OkHostnameVerifier extends Object implements HostnameVerifier
A HostnameVerifier consistent with RFC 2818.
-
Field Summary
Fields Modifier and Type Field Description static OkHostnameVerifierINSTANCE -
Method Summary
Modifier and Type Method Description booleanverify(String host, X509Certificate certificate)booleanverify(String host, SSLSession session)Verifies that the specified hostname is allowed within the specified SSL session.booleanverifyHostName(String hostName, String cn)Returns true ifhostNamematches the name or patterncn.
-
Field Details
-
INSTANCE
-
-
Method Details
-
verify
Description copied from interface:HostnameVerifierVerifies that the specified hostname is allowed within the specified SSL session.- Specified by:
verifyin interfaceHostnameVerifier- Parameters:
host- the hostname.session- the SSL session of the connection.- Returns:
trueif the specified hostname is allowed, otherwisefalse.
-
verify
-
verifyHostName
Returns true ifhostNamematches the name or patterncn.- Parameters:
hostName- lowercase host name.cn- certificate host name. May include wildcards like*.android.com.
-