bpo-31518: Change TLS protocol for Debian (#3660) · python/cpython@aab2258
@@ -1583,7 +1583,7 @@ def test_networked_good_cert(self):
15831583import ssl
15841584support.requires('network')
15851585with support.transient_internet('self-signed.pythontest.net'):
1586-context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
1586+context = ssl.SSLContext(ssl.PROTOCOL_TLS)
15871587context.verify_mode = ssl.CERT_REQUIRED
15881588context.load_verify_locations(CERT_selfsigned_pythontestdotnet)
15891589h = client.HTTPSConnection('self-signed.pythontest.net', 443, context=context)
@@ -1599,7 +1599,7 @@ def test_networked_bad_cert(self):
15991599import ssl
16001600support.requires('network')
16011601with support.transient_internet('self-signed.pythontest.net'):
1602-context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
1602+context = ssl.SSLContext(ssl.PROTOCOL_TLS)
16031603context.verify_mode = ssl.CERT_REQUIRED
16041604context.load_verify_locations(CERT_localhost)
16051605h = client.HTTPSConnection('self-signed.pythontest.net', 443, context=context)
@@ -1620,7 +1620,7 @@ def test_local_good_hostname(self):
16201620# The (valid) cert validates the HTTP hostname
16211621import ssl
16221622server = self.make_server(CERT_localhost)
1623-context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
1623+context = ssl.SSLContext(ssl.PROTOCOL_TLS)
16241624context.verify_mode = ssl.CERT_REQUIRED
16251625context.load_verify_locations(CERT_localhost)
16261626h = client.HTTPSConnection('localhost', server.port, context=context)
@@ -1634,7 +1634,7 @@ def test_local_bad_hostname(self):
16341634# The (valid) cert doesn't validate the HTTP hostname
16351635import ssl
16361636server = self.make_server(CERT_fakehostname)
1637-context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
1637+context = ssl.SSLContext(ssl.PROTOCOL_TLS)
16381638context.verify_mode = ssl.CERT_REQUIRED
16391639context.check_hostname = True
16401640context.load_verify_locations(CERT_fakehostname)