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 sync and async Redis clients to use a pre-configured SSLContext for standalone and cluster connections. Preserve the existing SSL option path when no custom context is supplied.
Refs #3599
Copy file name to clipboardExpand all lines: redis/connection.py
+35-27Lines changed: 35 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -2035,6 +2035,7 @@ def __init__(
2035
2035
ssl_ocsp_expected_cert=None,
2036
2036
ssl_min_version=None,
2037
2037
ssl_ciphers=None,
2038
+
ssl_context=None,
2038
2039
**kwargs,
2039
2040
):
2040
2041
"""Constructor
@@ -2058,6 +2059,9 @@ def __init__(
2058
2059
ssl_ocsp_expected_cert: A PEM armoured string containing the expected certificate to be returned from the ocsp verification service.
2059
2060
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.
2060
2061
ssl_ciphers: A string listing the ciphers that are allowed to be used. Defaults to None, which means that the default ciphers are used. See https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_ciphers for more information.
2062
+
ssl_context: A pre-configured ``ssl.SSLContext`` to use for the
2063
+
connection. If provided, it takes precedence over the other
0 commit comments