Package org.mariadb.jdbc.client.tls

## Class HostnameVerifier

- java.lang.Object
- - org.mariadb.jdbc.client.tls.HostnameVerifier

    public class HostnameVerifier
    extends Object

SSL host verification

### Constructor Summary

Constructors
`HostnameVerifier()`

### Method Summary

All Methods Static Methods Concrete Methods
`static boolean` `isIPv4​(String ip)` check if ip correspond to IPV4
`static boolean` `isIPv6​(String ip)` check if ip correspond to IPV6
`static void` `verify​(String host, X509Certificate cert, long serverThreadId)` Verification that throw an exception with a detailed error message in case of error.

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

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

### 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