mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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>
This commit is contained in:
parent
4df60f18c6
commit
a170fa162d
13 changed files with 321 additions and 310 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue