From 529234c608168bf76349f46d4e7e348e8817dd3a Mon Sep 17 00:00:00 2001 From: Chandler Newby Date: Thu, 3 Oct 2019 13:09:44 -0600 Subject: [PATCH] Remove version check on ssl verify toggle --- splunklib/binding.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/splunklib/binding.py b/splunklib/binding.py index 1cd2017e8..f1129098a 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -1357,8 +1357,7 @@ def connect(scheme, host, port): if key_file is not None: kwargs['key_file'] = key_file if cert_file is not None: kwargs['cert_file'] = cert_file - # If running Python 2.7.9+, disable SSL certificate validation - if (sys.version_info >= (2,7,9) and key_file is None and cert_file is None) and not verify: + if not verify: kwargs['context'] = ssl._create_unverified_context() return six.moves.http_client.HTTPSConnection(host, port, **kwargs) raise ValueError("unsupported scheme: %s" % scheme)