(self, storename, purpose)
| 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): |
no test coverage detected