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
This commit is contained in:
Ben Hardill 2024-09-16 11:55:05 +01:00
parent 674eb36e15
commit f44868384e
No known key found for this signature in database
GPG Key ID: 74DD076979ABB1E7

View File

@ -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;
}