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 Details

  • Method Details

    • verify

      public boolean verify​(String host, SSLSession session)
      Description copied from interface: HostnameVerifier
      Verifies that the specified hostname is allowed within the specified SSL session.
      Specified by:
      verify in interface HostnameVerifier
      Parameters:
      host - the hostname.
      session - the SSL session of the connection.
      Returns:
      true if the specified hostname is allowed, otherwise false.
    • verify

      public boolean verify​(String host, X509Certificate certificate)
    • verifyHostName

      public boolean verifyHostName​(String hostName, String cn)
      Returns true if hostName matches the name or pattern cn.
      Parameters:
      hostName - lowercase host name.
      cn - certificate host name. May include wildcards like *.android.com.