You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Allow to control the minimum SSL version
It's useful for applications that has strict security requirements.
* Add tests for minimum SSL version
The commit updates test_tcp_ssl_connect for both sync and async
connections. Now it sets the minimum SSL version. The test is ran with
both TLSv1.2 and TLSv1.3 (if supported).
A new test case is test_tcp_ssl_version_mismatch. The test added for
both sync and async connections. It uses TLS 1.3 on the client side,
and TLS 1.2 on the server side. It expects a connection error. The
test is skipped if TLS 1.3 is not supported.
* Add example of using a minimum TLS version
Copy file name to clipboardExpand all lines: redis/connection.py
+5
Original file line number
Diff line number
Diff line change
@@ -769,6 +769,7 @@ def __init__(
769
769
ssl_validate_ocsp_stapled=False,
770
770
ssl_ocsp_context=None,
771
771
ssl_ocsp_expected_cert=None,
772
+
ssl_min_version=None,
772
773
**kwargs,
773
774
):
774
775
"""Constructor
@@ -787,6 +788,7 @@ def __init__(
787
788
ssl_validate_ocsp_stapled: If set, perform a validation on a stapled ocsp response
788
789
ssl_ocsp_context: A fully initialized OpenSSL.SSL.Context object to be used in verifying the ssl_ocsp_expected_cert
789
790
ssl_ocsp_expected_cert: A PEM armoured string containing the expected certificate to be returned from the ocsp verification service.
791
+
ssl_min_version: The lowest supported SSL version. It affects the supported SSL versions of the SSLContext. None leaves the default provided by ssl module.
0 commit comments