Disable auto-TLS for port 8883

This commit is contained in:
Stephan Hadinger 2022-05-08 17:33:11 +02:00
parent e372f0c63a
commit 2730df65c2
2 changed files with 4 additions and 4 deletions

View File

@ -1487,6 +1487,10 @@ void SettingsDelta(void) {
ParseIPv4(&Settings->ipv4_rgx_subnetmask, PSTR(WIFI_RGX_SUBNETMASK));
SettingsUpdateText(SET_RGX_SSID, PSTR(WIFI_RGX_SSID));
SettingsUpdateText(SET_RGX_PASSWORD, PSTR(WIFI_RGX_PASSWORD));
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;
}
}
if (Settings->version < 0x09050007) {
#ifdef DISABLE_REFERER_CHK

View File

@ -202,10 +202,6 @@ void MqttInit(void) {
#endif //USE_MQTT_AZURE_IOT
#ifdef USE_MQTT_TLS
bool aws_iot_host = false;
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)
// Detect AWS IoT and set default parameters