Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ca3342

Browse files
committed
Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch by Baji.
2 parents c918800 + 8dd7aeb commit 3ca3342

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/ssl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ def _load_windows_store_certs(self, storename, purpose):
410410
if encoding == "x509_asn":
411411
if trust is True or purpose.oid in trust:
412412
certs.extend(cert)
413-
self.load_verify_locations(cadata=certs)
413+
if certs:
414+
self.load_verify_locations(cadata=certs)
414415
return certs
415416

416417
def load_default_certs(self, purpose=Purpose.SERVER_AUTH):

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ Core and Builtins
226226
Library
227227
-------
228228

229+
- Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store
230+
is empty. Patch by Baji.
231+
229232
- Issue #26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex`
230233
to support importing packages.
231234

0 commit comments

Comments
 (0)