mirror of https://github.com/arendst/Tasmota.git
Auto enabled TLS if port is 443
This commit is contained in:
parent
8356126c30
commit
f6eaa77f28
|
@ -197,8 +197,8 @@ void MqttInit(void) {
|
||||||
Settings->mqtt_port = 8883;
|
Settings->mqtt_port = 8883;
|
||||||
#endif //USE_MQTT_AZURE_IOT
|
#endif //USE_MQTT_AZURE_IOT
|
||||||
#ifdef USE_MQTT_TLS
|
#ifdef USE_MQTT_TLS
|
||||||
if ((8883 == Settings->mqtt_port) || (8884 == Settings->mqtt_port)) {
|
if ((8883 == Settings->mqtt_port) || (8884 == Settings->mqtt_port) || (443 == Settings->mqtt_port)) {
|
||||||
// Turn on TLS for port 8883 (TLS) and 8884 (TLS, client certificate)
|
// Turn on TLS for port 8883 (TLS), 8884 (TLS, client certificate), 443 (TLS, user/password)
|
||||||
Settings->flag4.mqtt_tls = true;
|
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)
|
Mqtt.mqtt_tls = Settings->flag4.mqtt_tls; // this flag should not change even if we change the SetOption (until reboot)
|
||||||
|
|
Loading…
Reference in New Issue