MCPcopy Index your code
hub / github.com/masterking32/MasterHttpRelayVPN / uninstall_ca

Function uninstall_ca

src/core/cert_installer.py:590–613  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

588
589
590def 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

Callers 1

mainFunction · 0.90

Calls 4

_uninstall_windowsFunction · 0.85
_uninstall_macosFunction · 0.85
_uninstall_linuxFunction · 0.85
_uninstall_firefoxFunction · 0.85

Tested by

no test coverage detected