Class HostnameCommon

java.lang.Object
nl.altindag.ssl.hostnameverifier.HostnameCommon

final class HostnameCommon extends Object
This HostnameCommon is copied from OkHttp library, see here for the original content: - https://github.com/square/okhttp/blob/69ae7f3e10dae0554f3181edaa52bcd77ee448ab/okhttp/src/commonMain/kotlin/okhttp3/internal/-HostnamesCommon.kt#L1
  • Field Details

    • VERIFY_AS_IP_ADDRESS

      private static final Pattern VERIFY_AS_IP_ADDRESS
  • Constructor Details

    • HostnameCommon

      private HostnameCommon()
  • Method Details

    • canParseAsIpAddress

      static boolean canParseAsIpAddress(String value)
    • containsInvalidLabelLengths

      static boolean containsInvalidLabelLengths(String hostname)
      Returns true if the length is not valid for DNS (empty or greater than 253 characters), or if any label is longer than 63 characters. Trailing dots are okay.
    • containsInvalidHostnameAsciiCodes

      static boolean containsInvalidHostnameAsciiCodes(String hostname)