summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-03-17 15:02:53 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-03-17 15:02:53 -0700
commit3ca334230712ef0e1b20f046cf62a24a1117a57a (patch)
tree6352b777d746e6753283ff28cf878091eb8e3d77
parentc9188000d782d4c393cbd5941949bdcf41b143da (diff)
parent8dd7aebc23b3303bc22fcde598a2e43895046057 (diff)
downloadcpython-git-3ca334230712ef0e1b20f046cf62a24a1117a57a.tar.gz
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 ab7a49b576..df39592327 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 7d3f422c54..81bbad6ccd 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -226,6 +226,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.