]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Disable TLS 1.3 in one test 2725/head
authorBen Darnell <ben@bendarnell.com>
Sun, 11 Aug 2019 02:00:41 +0000 (22:00 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 11 Aug 2019 03:05:00 +0000 (23:05 -0400)
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 304146ce9035a2573ba864d25b2745965129eafc..5c1f73eab7b52037c753688ecf1b14b6b3757eb0 100644 (file)
@@ -973,9 +973,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: