From 5ec04be95d1531bf551056f80d3f7d84d48e5138 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 28 Apr 2023 12:06:22 +0100 Subject: [PATCH] Do not set_ciphers(DEFAULT_CIPHERS) if DEFAULT_CIPHERS is None Fixes #2921 --- botocore/httpsession.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botocore/httpsession.py b/botocore/httpsession.py index 48e2e5d269..b3fe6e6c0c 100644 --- a/botocore/httpsession.py +++ b/botocore/httpsession.py @@ -113,7 +113,10 @@ def create_urllib3_context( context = SSLContext(ssl_version) - context.set_ciphers(ciphers or DEFAULT_CIPHERS) + if ciphers: + context.set_ciphers(ciphers) + elif DEFAULT_CIPHERS: + context.set_ciphers(DEFAULT_CIPHERS) # Setting the default here, as we may have no ssl module on import cert_reqs = ssl.CERT_REQUIRED if cert_reqs is None else cert_reqs