diff --git a/API/MqttClientWrapper.cs b/API/MqttClientWrapper.cs
index 9ec0268..4968171 100644
--- a/API/MqttClientWrapper.cs
+++ b/API/MqttClientWrapper.cs
@@ -61,7 +61,19 @@ public MqttClientWrapper(string clientId, string mqttBroker, string mqttPort, st
UseTls = true,
AllowUntrustedCertificates = untrusted,
IgnoreCertificateChainErrors = untrusted,
- IgnoreCertificateRevocationErrors = untrusted
+ IgnoreCertificateRevocationErrors = untrusted,
+ CertificateValidationHandler = context =>
+ {
+ if(IgnoreCertificateErrors)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
});
diff --git a/TEAMS2HA.csproj b/TEAMS2HA.csproj
index abd0e85..71f3b55 100644
--- a/TEAMS2HA.csproj
+++ b/TEAMS2HA.csproj
@@ -5,8 +5,8 @@