mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Default to validating the server certificate for mqtts://-URLs
When the server URL has the protocol mqtts:// and no further SSL/TLS options are supplied, default to validating the server certificate. Fixes #2379.
This commit is contained in:
parent
e94634544c
commit
3759e30497
@ -134,6 +134,9 @@ module.exports = function(RED) {
|
|||||||
agent: agent
|
agent: agent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.brokerurl.indexOf("mqtts://") > -1 && (!this.usetls || !n.tls))
|
||||||
|
// Default to validating the server cert
|
||||||
|
this.verifyservercert = true;
|
||||||
} else {
|
} else {
|
||||||
// construct the std mqtt:// url
|
// construct the std mqtt:// url
|
||||||
if (this.usetls) {
|
if (this.usetls) {
|
||||||
|
Loading…
Reference in New Issue
Block a user