]> granicus.if.org Git - python/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:19 +0000 (15:02 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Thu, 17 Mar 2016 22:02:19 +0000 (15:02 -0700)
Lib/ssl.py
Misc/NEWS

index 5df6ed3f1645a4bd6f77fcaa880544af102ae627..34f7aaa6ac399a3b8e17c774cdbcde4bdc5a4ff2 100644 (file)
@@ -380,7 +380,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 29d4a4c0f9be319a8263d85518342376545f9bf5..18df31755b8155367b8f5805e2681e6c9d967dfe 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -58,6 +58,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store
+  is empty. Patch by Baji.
+
 - Issue #26513: Fixes platform module detection of Windows Server
 
 - Issue #23718: Fixed parsing time in week 0 before Jan 1.  Original patch by