summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2_localnet.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2017-09-15 18:27:30 (GMT)
committerGitHub <noreply@github.com>2017-09-15 18:27:30 (GMT)
commita170fa162dc03f0a014373349e548954fff2e567 (patch)
treeed08062f8462d8b9e98e38b7832e39a85881b4e3 /Lib/test/test_urllib2_localnet.py
parent4df60f18c64ba2835e68bf3eed08d8002a00f4ac (diff)
downloadcpython-a170fa162dc03f0a014373349e548954fff2e567.zip
cpython-a170fa162dc03f0a014373349e548954fff2e567.tar.gz
cpython-a170fa162dc03f0a014373349e548954fff2e567.tar.bz2
bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER (#3058)
Replaces PROTOCOL_TLSv* and PROTOCOL_SSLv23 with PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
-rw-r--r--Lib/test/test_urllib2_localnet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index 741d136..b2d1e5f 100644
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -594,7 +594,7 @@ class TestUrlopen(unittest.TestCase):
def cb_sni(ssl_sock, server_name, initial_context):
nonlocal sni_name
sni_name = server_name
- context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.set_servername_callback(cb_sni)
handler = self.start_https_server(context=context, certfile=CERT_localhost)
context = ssl.create_default_context(cafile=CERT_localhost)