From a7e5b99020ae8ef67b77c7f1cf61fff008928940 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Wed, 24 Jan 2024 11:17:33 -0600 Subject: [PATCH] Fix keyring existence check Signed-off-by: 1000TurquoisePogs --- lib/webserver.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/webserver.js b/lib/webserver.js index 8b3619cc..1979e8d9 100644 --- a/lib/webserver.js +++ b/lib/webserver.js @@ -138,10 +138,10 @@ function loadPem(locations, type, keyrings, pass) { let saf = []; types.filter(type=> type.startsWith('safkeyring')) .forEach((type)=> { saf = saf.concat(locationsByType[type]) }); - if (saf && os.platform() != 'os390') { + if (saf.length > 0 && os.platform() != 'os390') { bootstrapLogger.severe('ZWED0145E');//Cannot load SAF keyring content outside of z/OS' process.exit(constants.EXIT_NO_SAFKEYRING); - } else if (saf && keyring_js) { + } else if (saf.length > 0 && keyring_js) { saf.forEach((safEntry)=> { /* In the latest code it's possible the entry could start with @@ -181,7 +181,7 @@ function loadPem(locations, type, keyrings, pass) { userId, keyringName, label); } }); - } else if (saf && !keyring_js) { + } else if (saf.length > 0 && !keyring_js) { //Cannot load SAF keyring due to missing keyring_js library'); bootstrapLogger.warn('ZWED0150E'); }