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

Function mtls_certs_exist_for_gateway

crates/openshell-cli/src/run.rs:715–722  ·  view source on GitHub ↗

Check whether mTLS client certs exist on disk for a gateway name.

(name: &str)

Source from the content-addressed store, hash-verified

713
714/// Check whether mTLS client certs exist on disk for a gateway name.
715fn mtls_certs_exist_for_gateway(name: &str) -> bool {
716 openshell_core::paths::xdg_config_dir().is_ok_and(|d| {
717 let mtls = d.join("openshell").join("gateways").join(name).join("mtls");
718 mtls.join("ca.crt").is_file()
719 && mtls.join("tls.crt").is_file()
720 && mtls.join("tls.key").is_file()
721 })
722}
723
724fn package_managed_tls_dirs() -> Vec<PathBuf> {
725 if let Some(path) = std::env::var_os("OPENSHELL_LOCAL_TLS_DIR") {

Callers 1

gateway_addFunction · 0.85

Calls 1

xdg_config_dirFunction · 0.70

Tested by

no test coverage detected