/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_https_urllib.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-12-10 01:51:52 UTC
  • mfrom: (7206.3.13 python3.7)
  • Revision ID: breezy.the.bot@gmail.com-20181210015152-11zq10e7j0rl7sx3
Fix python 3.7 compatibility.

Merged from https://code.launchpad.net/~jelmer/brz/python3.7/+merge/359220

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
 
103
103
        # Python Issue #17980: avoid denials of service by refusing more than
104
104
        # one wildcard per fragment.
105
 
        ok({'subject': ((('commonName', 'a*b.com'),),)}, 'axxb.com')
 
105
        if sys.version_info[:2] >= (3, 7):
 
106
            # Python 3.7 dropped support for partial wildcards, see
 
107
            # https://docs.python.org/3/whatsnew/3.7.html#ssl
 
108
            not_ok({'subject': ((('commonName', 'a*b.com'),),)}, 'axxb.com')
 
109
        else:
 
110
            ok({'subject': ((('commonName', 'a*b.com'),),)}, 'axxb.com')
106
111
        not_ok({'subject': ((('commonName', 'a*b.co*'),),)}, 'axxb.com')
107
112
        not_ok({'subject': ((('commonName', 'a*b*.com'),),)}, 'axxbxxc.com')
108
113