Skip to content

Commit

Permalink
Merge pull request #428 from zowe/1000TurquoisePogs-patch-1
Browse files Browse the repository at this point in the history
Fix for v2 keyring / dev env
  • Loading branch information
1000TurquoisePogs authored Apr 25, 2022
2 parents 5980866 + a37f18c commit 11a3472
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/apiml.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ ApimlConnector.prototype = {
headers: {'accept':'application/json'}
}, this.tlsOptions);

if (!process.env['KEYSTORE_DIRECTORY']) {
//TODO FIXME We should not be referring to env var this far in the code.
const zweVerifyCerts = process.env['ZWE_zowe_verifyCertificates'];
if (!zweVerifyCerts || zweVerifyCerts=='DISABLED') {
//Keeping these certs causes an openssl error 46, unknown cert error in a dev environment
delete options.cert;
delete options.key;
Expand Down Expand Up @@ -258,7 +260,9 @@ ApimlConnector.prototype = {

registerMainServerInstance() {
const overrideOptions = Object.assign({},this.tlsOptions);
if (!process.env['KEYSTORE_DIRECTORY']) {
//TODO FIXME We should not be referring to env var this far in the code.
const zweVerifyCerts = process.env['ZWE_zowe_verifyCertificates'];
if (!zweVerifyCerts || zweVerifyCerts=='DISABLED') {
//Keeping these certs causes an openssl error 46, unknown cert error in a dev environment
delete overrideOptions.cert;
delete overrideOptions.key;
Expand Down
2 changes: 1 addition & 1 deletion lib/swagger-catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function getSchemesFromContext (nodeContext) {
}

function getHost(nodeContext) {
let hostname = process.env['ZOWE_EXPLORER_HOST'] ? process.env['ZOWE_EXPLORER_HOST'] : os.hostname();
let hostname = process.env['ZWE_zowe_externalDomains_0'] ? process.env['ZWE_zowe_externalDomains_0'] : os.hostname();
return nodeContext.https ? `${hostname}:${nodeContext.https.port}`
: `${hostname}:${nodeContext.http.port}`;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/terminal-proxy/lib/terminalProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ let scanAndImportHandlers = function(logger) {
let filenames;
let len;
try {
let handlerDir = pathModule.join(process.env.INSTANCE_DIR,'workspace','app-server','org.zowe.terminal.proxy','handlers');
let handlerDir = pathModule.join(process.env.ZWE_zowe_workspaceDirectory,'app-server','org.zowe.terminal.proxy','handlers');
filenames = fs.readdirSync(handlerDir);
len = filenames.length;
for (let i = 0; i < len; i++) {
Expand Down

0 comments on commit 11a3472

Please sign in to comment.