The ssl.match_hostname() function from Python 3.7
https://pypi.org/project/backports.ssl_match_hostname/