Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1129

Support IP address matching in match_hostname

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.4
    • 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.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: