Remove *cert_name* from the system's trusted root CAs on the current platform. Also attempts Firefox NSS removal. Returns True if the system store removal succeeded.
(cert_path: str, cert_name: str = CERT_NAME)
| 588 | |
| 589 | |
| 590 | def uninstall_ca(cert_path: str, cert_name: str = CERT_NAME) -> bool: |
| 591 | """ |
| 592 | Remove *cert_name* from the system's trusted root CAs on the current platform. |
| 593 | Also attempts Firefox NSS removal. |
| 594 | |
| 595 | Returns True if the system store removal succeeded. |
| 596 | """ |
| 597 | system = platform.system() |
| 598 | log.info("Removing CA certificate from %s…", system) |
| 599 | |
| 600 | if system == "Windows": |
| 601 | ok = _uninstall_windows(cert_path, cert_name) |
| 602 | elif system == "Darwin": |
| 603 | ok = _uninstall_macos(cert_name) |
| 604 | elif system == "Linux": |
| 605 | ok = _uninstall_linux(cert_path, cert_name) |
| 606 | else: |
| 607 | log.error("Unsupported platform: %s", system) |
| 608 | return False |
| 609 | |
| 610 | # Best-effort Firefox uninstall on all platforms |
| 611 | _uninstall_firefox(cert_name) |
| 612 | |
| 613 | return ok |
no test coverage detected