Return True if the CA cert appears to be already installed.
(cert_path: str)
| 545 | # ───────────────────────────────────────────────────────────────────────────── |
| 546 | |
| 547 | def is_ca_trusted(cert_path: str) -> bool: |
| 548 | """Return True if the CA cert appears to be already installed.""" |
| 549 | system = platform.system() |
| 550 | try: |
| 551 | if system == "Windows": |
| 552 | return _is_trusted_windows(cert_path) |
| 553 | if system == "Darwin": |
| 554 | return _is_trusted_macos(CERT_NAME) |
| 555 | return _is_trusted_linux(cert_path, CERT_NAME) |
| 556 | except Exception: |
| 557 | return False |
| 558 | |
| 559 | |
| 560 | def install_ca(cert_path: str, cert_name: str = CERT_NAME) -> bool: |
no test coverage detected