From: Steve Dower Date: Thu, 17 Mar 2016 22:02:39 +0000 (-0700) Subject: Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty... X-Git-Tag: v3.6.0a1~448^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dd7aebc23b3303bc22fcde598a2e43895046057;p=thirdparty%2FPython%2Fcpython.git Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch by Baji. --- diff --git a/Lib/ssl.py b/Lib/ssl.py index ab7a49b5763f..df3959232793 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -410,7 +410,8 @@ class SSLContext(_SSLContext): if encoding == "x509_asn": if trust is True or purpose.oid in trust: certs.extend(cert) - self.load_verify_locations(cadata=certs) + if certs: + self.load_verify_locations(cadata=certs) return certs def load_default_certs(self, purpose=Purpose.SERVER_AUTH): diff --git a/Misc/NEWS b/Misc/NEWS index 78980fe9663e..b8509ce2667c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -91,6 +91,9 @@ Core and Builtins Library ------- +- Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store + is empty. Patch by Baji. + - Issue #26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex` to support importing packages.