Fix support for supplied CA certs

This commit is contained in:
Ben Hardill
2021-07-26 10:25:06 +01:00
parent 142176f194
commit 26087f8dc7
2 changed files with 31 additions and 0 deletions

View File

@@ -449,6 +449,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
if (tlsNode) {
opts.https = {};
tlsNode.addTLSOptions(opts.https);
if (opts.https.ca) {
opts.https.certificateAuthority = opts.https.ca;
delete opts.https.ca;
}
} else {
if (msg.hasOwnProperty('rejectUnauthorized')) {
opts.https = { rejectUnauthorized: msg.rejectUnauthorized };