mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-14 03:46:49 +03:00
dev.20, fixes #3064, handling of optional gpios
This commit is contained in:
@@ -185,10 +185,14 @@ bool MqttSettingsService::configureMqtt() {
|
||||
#ifndef TASMOTA_SDK
|
||||
if (_state.enableTLS) {
|
||||
if (_state.rootCA == "insecure") {
|
||||
#if defined(EMSESP_DEBUG)
|
||||
emsesp::EMSESP::logger().debug("Start insecure MQTT");
|
||||
#endif
|
||||
static_cast<espMqttClientSecure *>(_mqttClient)->setInsecure();
|
||||
} else {
|
||||
#if defined(EMSESP_DEBUG)
|
||||
emsesp::EMSESP::logger().debug("Start secure MQTT with rootCA");
|
||||
#endif
|
||||
String certificate = "-----BEGIN CERTIFICATE-----\n" + _state.rootCA + "\n-----END CERTIFICATE-----\n";
|
||||
static_cast<espMqttClientSecure *>(_mqttClient)->setCACert(certificate.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user