Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch by Baji.
This commit is contained in:
parent
1c80b152bd
commit
8dd7aebc23
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue