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

Function resolve_mtls_auth_enabled

crates/openshell-server/src/cli.rs:741–758  ·  view source on GitHub ↗
(
    args: &RunArgs,
    matches: &ArgMatches,
    file: Option<&ConfigFile>,
)

Source from the content-addressed store, hash-verified

739}
740
741fn resolve_mtls_auth_enabled(
742 args: &RunArgs,
743 matches: &ArgMatches,
744 file: Option<&ConfigFile>,
745) -> bool {
746 let file_configured = file
747 .and_then(|f| f.openshell.gateway.mtls_auth.as_ref())
748 .is_some();
749 if file_configured || !arg_defaulted(matches, "enable_mtls_auth") {
750 return args.enable_mtls_auth;
751 }
752
753 if args.disable_tls || args.tls_client_ca.is_none() || args.oidc_issuer.is_some() {
754 return false;
755 }
756
757 is_singleplayer_driver(args)
758}
759
760#[cfg(test)]
761mod tests {

Callers 1

prepare_server_configFunction · 0.85

Calls 2

arg_defaultedFunction · 0.85
is_singleplayer_driverFunction · 0.85

Tested by

no test coverage detected