summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-03-17 22:02:19 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-03-17 22:02:19 (GMT)
commit9cb2074fe44cfd6dd79a5f741619c376ed03da14 (patch)
tree959160565005342748211b5c3fc3b95cfc8d6dcf
parent2bf60cb02028d4bcf31e446f2e2ae81aa23bd60c (diff)
downloadcpython-9cb2074fe44cfd6dd79a5f741619c376ed03da14.zip
cpython-9cb2074fe44cfd6dd79a5f741619c376ed03da14.tar.gz
cpython-9cb2074fe44cfd6dd79a5f741619c376ed03da14.tar.bz2
Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch by Baji.
-rw-r--r--Lib/ssl.py3
-rw-r--r--Misc/NEWS3
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 5df6ed3..34f7aaa 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -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):
diff --git a/Misc/NEWS b/Misc/NEWS
index 29d4a4c..18df317 100644
--- 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