-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
Let's update ssl_match_hostname to support IP addresses, following the implementation in Python 3.5. The ipaddress module is available in Python 3.3+, but is not used in ssl.match_hostname until Python 3.5.
We will have to use our backported ssl_match_hostname module (which should be updated to the latest from cpython) for all versions of python < 3.5, rather than unconditionally importing ssl.match_hostname when available. We should also make the support conditional if the ipaddress module is available. There is a backport ipaddress module in pypi we can automatically install for python < 3.3 when the 'tls' extra is specified at install time.