This commit is contained in:
michael
2024-12-24 13:14:19 +01:00
parent 4d74d0c522
commit 4846a52d45
3 changed files with 4 additions and 11 deletions

View File

@@ -114,15 +114,7 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
}
if ((toUpper(_param) == "VALIDATESERVERCERT") && (splitted.size() > 1))
{
bool _validateServerCert = alphanumericToBoolean(splitted[1]);
if (_validateServerCert == true)
{
validateServerCert = false;
}
else
{
validateServerCert = true;
}
validateServerCert = alphanumericToBoolean(splitted[1]);
}
if ((toUpper(_param) == "CLIENTCERT") && (splitted.size() > 1))
{

View File

@@ -303,7 +303,7 @@ int MQTT_Init() {
if (caCert.length()){
mqtt_cfg.broker.verification.certificate = caCert.c_str();
mqtt_cfg.broker.verification.certificate_len = caCert.length() + 1;
mqtt_cfg.broker.verification.skip_cert_common_name_check = validateServerCert;
mqtt_cfg.broker.verification.skip_cert_common_name_check = !validateServerCert;
}
if (clientCert.length() && clientKey.length()){

View File

@@ -1122,7 +1122,8 @@
<tr class="MQTTItem expert" unused_id="exMqtt">
<td class="indent1">
<label><class id="MQTT_ValidateServerCert_text" style="color:black;">Validate ServerCert</class></label>
<input type="checkbox" id="MQTT_ValidateServerCert_enabled" value="1" onclick = 'InvertEnableItem("MQTT", "ValidateServerCert")' unchecked >
<label for=MQTT_ValidateServerCert_enabled><class id="MQTT_ValidateServerCert_text" style="color:black;">Validate ServerCert</class></label>
</td>
<td>
<select id="MQTT_ValidateServerCert_value1">