From f6eaa77f286ca1b1a1ff2c31c5dd59c06738a478 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Mon, 16 Aug 2021 14:20:10 +0200 Subject: [PATCH] Auto enabled TLS if port is 443 --- tasmota/xdrv_02_9_mqtt.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_02_9_mqtt.ino b/tasmota/xdrv_02_9_mqtt.ino index 78f7c88c1..0277bbc46 100644 --- a/tasmota/xdrv_02_9_mqtt.ino +++ b/tasmota/xdrv_02_9_mqtt.ino @@ -197,8 +197,8 @@ void MqttInit(void) { Settings->mqtt_port = 8883; #endif //USE_MQTT_AZURE_IOT #ifdef USE_MQTT_TLS - if ((8883 == Settings->mqtt_port) || (8884 == Settings->mqtt_port)) { - // Turn on TLS for port 8883 (TLS) and 8884 (TLS, client certificate) + if ((8883 == Settings->mqtt_port) || (8884 == Settings->mqtt_port) || (443 == Settings->mqtt_port)) { + // Turn on TLS for port 8883 (TLS), 8884 (TLS, client certificate), 443 (TLS, user/password) Settings->flag4.mqtt_tls = true; } Mqtt.mqtt_tls = Settings->flag4.mqtt_tls; // this flag should not change even if we change the SetOption (until reboot)