org.apache.http.conn.ssl

## Class DefaultHostnameVerifier

- java.lang.Object
- - org.apache.http.conn.ssl.DefaultHostnameVerifier

- All Implemented Interfaces:
    HostnameVerifier

      @Contract(threading=IMMUTABLE_CONDITIONAL)
      public final class DefaultHostnameVerifier
      extends Object
      implements HostnameVerifier

  Default `HostnameVerifier` implementation.
  Since:
    4.4

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultHostnameVerifier()`
    `DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `verify(String host, SSLSession session)`
    `void` | `verify(String host, X509Certificate cert)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultHostnameVerifier

          public DefaultHostnameVerifier(PublicSuffixMatcher publicSuffixMatcher)

    - #### DefaultHostnameVerifier

          public DefaultHostnameVerifier()

  - ### Method Detail

    - #### verify

          public boolean verify(String host,
                       SSLSession session)

      Specified by:
        `verify` in interface `HostnameVerifier`

    - #### verify

          public void verify(String host,
                    X509Certificate cert)
                      throws SSLException

      Throws:
        `SSLException`

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.