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

Function is_ca_trusted

src/core/cert_installer.py:547–557  ·  view source on GitHub ↗

Return True if the CA cert appears to be already installed.

(cert_path: str)

Source from the content-addressed store, hash-verified

545# ─────────────────────────────────────────────────────────────────────────────
546
547def 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
560def install_ca(cert_path: str, cert_name: str = CERT_NAME) -> bool:

Callers 1

mainFunction · 0.90

Calls 3

_is_trusted_windowsFunction · 0.85
_is_trusted_macosFunction · 0.85
_is_trusted_linuxFunction · 0.85

Tested by

no test coverage detected