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 Constructor Description HostnameVerifier()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisIPv4(String ip)check if ip correspond to IPV4static booleanisIPv6(String ip)check if ip correspond to IPV6static voidverify(String host, X509Certificate cert, long serverThreadId)Verification that throw an exception with a detailed error message in case of error.
-
-
-
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- hostnamecert- certificateserverThreadId- server thread Identifier to identify connection in logs- Throws:
SSLException- exception
-
-