Merge pull request #15572 from s-hadinger/Disable-auto-TLS-for-port-8883

Disable auto-TLS for port 8883
This commit is contained in:
s-hadinger 2022-05-08 17:50:04 +02:00 committed by GitHub
commit 3735167d4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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