Skip to content

Commit

Permalink
Merge pull request #533 from zowe/1000TurquoisePogs-patch-9
Browse files Browse the repository at this point in the history
Fix keyring existence check
  • Loading branch information
1000TurquoisePogs authored Feb 2, 2024
2 parents f9cf52f + a7e5b99 commit c824fd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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');
}
Expand Down

0 comments on commit c824fd2

Please sign in to comment.