Change selfsigned to reject_unauthorized

This commit is contained in:
Koen Kanters 2018-08-17 18:39:45 +02:00 committed by GitHub
parent 47de3e20ae
commit fb9600d55d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,8 @@ class MQTT {
options.clientId = mqttSettings.client_id;
}
if (mqttSettings.selfsigned) {
logger.debug(`Using Self Signed Cert. Ignoring warnings.`);
if (mqttSettings.hasOwnProperty('reject_unauthorized') && !mqttSettings.reject_unauthorized) {
logger.debug(`MQTT reject_unauthorized set false, ignoring certificate warnings.`);
options.rejectUnauthorized = false;
}