Skip to content

Commit

Permalink
Make client attls follow server attls if not defined
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs authored May 28, 2024
1 parent c528a27 commit f7aaa30
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,15 @@ module.exports.isServerHttps = function(zoweConfig) {
}

function isClientAttls(zoweConfig) {
return zoweConfig.zowe.network?.client?.tls?.attls || zoweConfig.components['app-server'].zowe?.network?.client?.tls?.attls;
let clientGlobalAttls = zoweConfig.zowe.network?.client?.tls?.attls;
let clientLocalAttls zoweConfig.components['app-server'].zowe?.network?.client?.tls?.attls;
let clientAttls = clientGlobalAttls || clientLocalAttls;
if ((clientGlobalAttls !== false) && (clientLocalAttls !== false) && (!clientAttls)) {
// If client attls not explicitly false OR truthy, use have client follow server attls variable. it simplifies common case in which users want both.
return zoweConfig.zowe.network?.server?.tls?.attls || zoweConfig.components['app-server'].zowe?.network?.server?.tls?.attls;
} else {
return clientAttls;
}
}
module.exports.isClientAttls = isClientAttls;

Expand Down

0 comments on commit f7aaa30

Please sign in to comment.