From f44868384e7fb12d30f0ac1b5788074b6321b7fc Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 16 Sep 2024 11:55:05 +0100 Subject: [PATCH] Move SNI, ALPN and Verify Server cert out of check This moves the SNI, ALPN and the Verify Server Cert check out of the check for if the supplied certs/key are actually valid as these may be still required for correct behaviour. part of #4877 --- .../@node-red/nodes/core/network/05-tls.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/05-tls.js b/packages/node_modules/@node-red/nodes/core/network/05-tls.js index 888d749fd..f47067729 100644 --- a/packages/node_modules/@node-red/nodes/core/network/05-tls.js +++ b/packages/node_modules/@node-red/nodes/core/network/05-tls.js @@ -104,14 +104,14 @@ module.exports = function(RED) { if (this.credentials && this.credentials.passphrase) { opts.passphrase = this.credentials.passphrase; } - if (this.servername) { - opts.servername = this.servername; - } - if (this.alpnprotocol) { - opts.ALPNProtocols = [this.alpnprotocol]; - } - opts.rejectUnauthorized = this.verifyservercert; } + if (this.servername) { + opts.servername = this.servername; + } + if (this.alpnprotocol) { + opts.ALPNProtocols = [this.alpnprotocol]; + } + opts.rejectUnauthorized = this.verifyservercert; return opts; }