diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js index 4945c5c8b..b4fbfcc35 100644 --- a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js +++ b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js @@ -134,6 +134,9 @@ module.exports = function(RED) { agent: agent } } + if (this.brokerurl.indexOf("mqtts://") > -1 && (!this.usetls || !n.tls)) + // Default to validating the server cert + this.verifyservercert = true; } else { // construct the std mqtt:// url if (this.usetls) {