mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-33618: Enable TLS 1.3 in tests (GH-7079)
TLS 1.3 behaves slightly different than TLS 1.2. Session tickets and TLS client cert auth are now handled after the initialy handshake. Tests now either send/recv data to trigger session and client certs. Or tests ignore ConnectionResetError / BrokenPipeError on the server side to handle clients that force-close the socket fd. To test TLS 1.3, OpenSSL 1.1.1-pre7-dev (git master + OpenSSL PR https://github.com/openssl/openssl/pull/6340) is required. Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
28b9178023
commit
529525fb5a
9 changed files with 142 additions and 46 deletions
|
@ -251,6 +251,8 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
|
||||
server_context = test_utils.simple_server_sslcontext()
|
||||
client_context = test_utils.simple_client_sslcontext()
|
||||
# TODO: fix TLSv1.3 support
|
||||
client_context.options |= ssl.OP_NO_TLSv1_3
|
||||
|
||||
def client(sock, addr):
|
||||
time.sleep(0.5)
|
||||
|
|
|
@ -74,8 +74,6 @@ def simple_server_sslcontext():
|
|||
server_context.load_cert_chain(ONLYCERT, ONLYKEY)
|
||||
server_context.check_hostname = False
|
||||
server_context.verify_mode = ssl.CERT_NONE
|
||||
# TODO: fix TLSv1.3 support
|
||||
server_context.options |= ssl.OP_NO_TLSv1_3
|
||||
return server_context
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue