tlslite.utils.dns_utils module

Utilities for handling DNS hostnames

tlslite.utils.dns_utils.is_valid_hostname(hostname)

Check if the parameter is a valid hostname.

Parameters:hostname (str or bytearray) – string to check
Return type:boolean