MCPcopy Index your code
hub / github.com/RustPython/RustPython / _load_windows_store_certs

Method _load_windows_store_certs

Lib/ssl.py:515–526  ·  view source on GitHub ↗
(self, storename, purpose)

Source from the content-addressed store, hash-verified

513 self._set_alpn_protocols(protos)
514
515 def _load_windows_store_certs(self, storename, purpose):
516 try:
517 for cert, encoding, trust in enum_certificates(storename):
518 # CA certs are never PKCS#7 encoded
519 if encoding == "x509_asn":
520 if trust is True or purpose.oid in trust:
521 try:
522 self.load_verify_locations(cadata=cert)
523 except SSLError as exc:
524 warnings.warn(f"Bad certificate in Windows certificate store: {exc!s}")
525 except PermissionError:
526 warnings.warn("unable to enumerate Windows certificate store")
527
528 def load_default_certs(self, purpose=Purpose.SERVER_AUTH):
529 if not isinstance(purpose, _ASN1Object):

Callers 1

load_default_certsMethod · 0.95

Calls 3

enum_certificatesFunction · 0.50
load_verify_locationsMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected