Package org.mariadb.jdbc.util
Class IPUtility
- java.lang.Object
-
- org.mariadb.jdbc.util.IPUtility
-
public class IPUtility extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description IPUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisInetAddress(java.lang.String ipString)static java.lang.StringstripTrailingDot(java.lang.String host)Remove the DNS root label marker from a hostname.
-
-
-
Method Detail
-
isInetAddress
public static boolean isInetAddress(java.lang.String ipString)
-
stripTrailingDot
public static java.lang.String stripTrailingDot(java.lang.String host)
Remove the DNS root label marker from a hostname. A trailing dot marks a name as absolute for resolution only: it must be kept for DNS resolution, but removed for every TLS use of the name. RFC 6066 section 3 prohibits it in SNI, and certificates never carry it, so an IP literal written as10.0.0.1.must be normalized before being recognized as an IP.- Parameters:
host- hostname, may be null- Returns:
- hostname without any trailing dot
-
-