diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-03 19:36:48 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-03 19:36:48 (GMT) |
commit | 1cca273669598978f6dfc1d1aad92e02a84bbe04 (patch) | |
tree | 1f691e61f1dcc13f14fee02fe0031dd865e74869 /Lib/test/test_ssl.py | |
parent | 2cb0e73a89589ce56ba17da39a06f8017cfc92e4 (diff) | |
parent | 4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd (diff) | |
download | cpython-1cca273669598978f6dfc1d1aad92e02a84bbe04.zip cpython-1cca273669598978f6dfc1d1aad92e02a84bbe04.tar.gz cpython-1cca273669598978f6dfc1d1aad92e02a84bbe04.tar.bz2 |
merge 3.4 (#22417)
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 7191b1e..4f46571 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -2582,9 +2582,10 @@ else: d1 = f.read() d2 = '' # now fetch the same data from the HTTPS server - url = 'https://%s:%d/%s' % ( - HOST, server.port, os.path.split(CERTFILE)[1]) - f = urllib.request.urlopen(url) + url = 'https://localhost:%d/%s' % ( + server.port, os.path.split(CERTFILE)[1]) + context = ssl.create_default_context(cafile=CERTFILE) + f = urllib.request.urlopen(url, context=context) try: dlen = f.info().get("content-length") if dlen and (int(dlen) > 0): |