MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / mtls_certs

Function mtls_certs

e2e/python/test_security_tls.py:120–131  ·  view source on GitHub ↗

Return (ca_pem, cert_pem, key_pem) for the provisioned mTLS client.

(
    cluster_name: str, server_endpoint: tuple[str, int, str]
)

Source from the content-addressed store, hash-verified

118
119@pytest.fixture(scope="session")
120def mtls_certs(
121 cluster_name: str, server_endpoint: tuple[str, int, str]
122) -> tuple[bytes, bytes, bytes]:
123 """Return (ca_pem, cert_pem, key_pem) for the provisioned mTLS client."""
124 _, _, scheme = server_endpoint
125 if scheme != "https":
126 pytest.skip("server is not using TLS; mTLS tests require an HTTPS endpoint")
127 mtls = _mtls_dir(cluster_name)
128 ca = (mtls / "ca.crt").read_bytes()
129 cert = (mtls / "tls.crt").read_bytes()
130 key = (mtls / "tls.key").read_bytes()
131 return ca, cert, key
132
133
134# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

_mtls_dirFunction · 0.70

Tested by

no test coverage detected