Class DefaultHostnameVerifier

    • Constructor Detail

      • DefaultHostnameVerifier

        public DefaultHostnameVerifier()
    • Method Detail

      • isIPv4

        public static boolean isIPv4​(String ip)
      • isIPv6

        public static boolean isIPv6​(String ip)
      • verify

        public boolean verify​(String host,
                              SSLSession session,
                              long serverThreadId)
        Verification, like HostnameVerifier.verify() with an additional server thread id to identify connection in logs.
        Parameters:
        host - host to connect (DNS/IP)
        session - SSL session
        serverThreadId - connection id to identify connection in logs
        Returns:
        true if valid
      • verify

        public static void verify​(String host,
                                  X509Certificate cert,
                                  long serverThreadId)
                           throws SSLException
        Verification that throw an exception with a detailed error message in case of error.
        Parameters:
        host - hostname
        cert - certificate
        serverThreadId - server thread Identifier to identify connection in logs
        Throws:
        SSLException - exception