Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keyring existence check #533

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading