]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty...
authorSteve Dower <steve.dower@microsoft.com>
Thu, 17 Mar 2016 22:02:39 +0000 (15:02 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Thu, 17 Mar 2016 22:02:39 +0000 (15:02 -0700)
Lib/ssl.py
Misc/NEWS

index ab7a49b5763f85b1e28f47da56016fbe4d01eebd..df39592327932f35839d6fb36f197c19268ef52e 100644 (file)
@@ -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):
index 78980fe9663e500e7fefd098fa3d74f3fce8cc46..b8509ce2667c9606c26b1db8ce581c196fc1480a 100644 (file)
--- 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.