Class HostnameVerifier


  • public class HostnameVerifier
    extends Object
    SSL host verification
    • Constructor Detail

      • HostnameVerifier

        public HostnameVerifier()
    • Method Detail

      • isIPv4

        public static boolean isIPv4​(String ip)
        check if ip correspond to IPV4
        Parameters:
        ip - ip value
        Returns:
        if ip is using IPV4 format
      • isIPv6

        public static boolean isIPv6​(String ip)
        check if ip correspond to IPV6
        Parameters:
        ip - ip value
        Returns:
        if ip is using IPV6 format
      • 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