]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Disable TLS 1.3 in one test
authorBen Darnell <ben@bendarnell.com>
Sun, 11 Aug 2019 02:00:41 +0000 (22:00 -0400)
committerBen Darnell <ben@bendarnell.com>
Tue, 3 Mar 2020 01:41:41 +0000 (20:41 -0500)
This test started failing on windows CI with an upgrade to python
3.7.4 (which bundles a newer version of openssl). Disable tls 1.3 for
now.

Possibly related to #2536

tornado/test/iostream_test.py

index 5d150f966063a1bc96ed09eb424b20e0f4e3e184..f3cd9a6de972080662bc2f780882f0aa15e895f1 100644 (file)
@@ -1037,9 +1037,16 @@ class WaitForHandshakeTest(AsyncTestCase):
             server = server_cls(ssl_options=_server_ssl_options())
             server.add_socket(sock)
 
-            client = SSLIOStream(
-                socket.socket(), ssl_options=dict(cert_reqs=ssl.CERT_NONE)
-            )
+            ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
+            ssl_ctx.check_hostname = False
+            ssl_ctx.verify_mode = ssl.CERT_NONE
+            # These tests fail with ConnectionAbortedErrors with TLS
+            # 1.3 on windows python 3.7.4 (which includes an upgrade
+            # to openssl 1.1.c. Other platforms might be affected with
+            # newer openssl too). Disable it until we figure out
+            # what's up.
+            ssl_ctx.options |= getattr(ssl, "OP_NO_TLSv1_3", 0)
+            client = SSLIOStream(socket.socket(), ssl_options=ssl_ctx)
             yield client.connect(("127.0.0.1", port))
             self.assertIsNotNone(client.socket.cipher())
         finally: