Skip to content

Commit

Permalink
Use zowe standard network config
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Oct 11, 2023
1 parent b912c01 commit e4f7f55
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,15 @@ WebServer.prototype = {
}
//secureOptions and secureProtocol documented here:
//https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options
if (typeof options.secureOptions == 'number') {
if (options.maxTls || options.minTls) {
this.httpsOptions.maxTls = options.maxTls;
this.httpsOptions.minTls = options.minTls;
} else if (typeof options.secureOptions == 'number') {
//the numbers you want here actually come from openssl, and are likely
//in this file: https://github.com/openssl/openssl/blob/master/include/openssl/ssl.h
this.httpsOptions.secureOptions = options.secureOptions;
} else if (typeof options.secureProtocol == 'string') {
this.httpsOptions.secureProtocol = options.secureProtocol;
} else {
let consts = crypto.constants;
//tls 1.3 was released in 2018, and tls 1.2 should be in this blacklist list when it has widespread support
this.httpsOptions.secureOptions = consts.SSL_OP_NO_SSLv2 |
consts.SSL_OP_NO_SSLv3 | consts.SSL_OP_NO_TLSv1 | consts.SSL_OP_NO_TLSv1_1;
}

let ciphers = readCiphersFromArray(options.ciphers);
Expand Down

0 comments on commit e4f7f55

Please sign in to comment.