Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Re-enable TLS 1.2 in cipher tests.

Andrey Rakhmatullind9e69bfb51d5
diff --git a/tests/mockserver.py b/tests/mockserver.py
index 48d7b8d37..6f0c274b9 100644
--- a/tests/mockserver.py
+++ b/tests/mockserver.py
@@ -289,8 +289,8 @@ def ssl_context_factory(keyfile='keys/localhost.key', certfile='keys/localhost.c
)
if cipher_string:
ctx = factory.getContext()
- # disabling TLS1.2+ because it unconditionally enables some strong ciphers
- ctx.set_options(SSL.OP_CIPHER_SERVER_PREFERENCE | SSL.OP_NO_TLSv1_2 | SSL_OP_NO_TLSv1_3)
+ # disabling TLS1.3 because it unconditionally enables some strong ciphers
+ ctx.set_options(SSL.OP_CIPHER_SERVER_PREFERENCE | SSL_OP_NO_TLSv1_3)
ctx.set_cipher_list(to_bytes(cipher_string))
return factory