(
args: &RunArgs,
matches: &ArgMatches,
file: Option<&ConfigFile>,
)
| 739 | } |
| 740 | |
| 741 | fn 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)] |
| 761 | mod tests { |
no test coverage detected