[New-bugs-announce] [issue26313] ssl.py _load_windows_store_certs fails if windows cert store is empty
Jonathan Kamens
report at bugs.python.org
Mon Feb 8 15:09:48 EST 2016
New submission from Jonathan Kamens:
In ssl.py:
def _load_windows_store_certs(self, storename, purpose):
certs = bytearray()
for cert, encoding, trust in enum_certificates(storename):
# CA certs are never PKCS#7 encoded
if encoding == "x509_asn":
if trust is True or purpose.oid in trust:
certs.extend(cert)
self.load_verify_locations(cadata=certs)
return certs
The line right before the return statement will raise an exception if certs is empty.
It should be protected with "if certs:" as it is elsewhere in this file.
----------
components: Windows
messages: 259880
nosy: Jonathan Kamens, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ssl.py _load_windows_store_certs fails if windows cert store is empty
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26313>
_______________________________________
More information about the New-bugs-announce
mailing list