update mqttClient, works with tasmota-arduino 2.14 / 3.0 without WiFiSecure

This commit is contained in:
MichaelDvP
2023-12-19 13:47:10 +01:00
parent 9f3e2dbcd3
commit 446601c6e0
6 changed files with 172 additions and 8 deletions

View File

@@ -78,27 +78,37 @@ espMqttClientSecure::espMqttClientSecure(uint8_t priority, uint8_t core)
}
espMqttClientSecure& espMqttClientSecure::setInsecure() {
#if defined(EMC_CLIENT_SECURE)
_client.client.setInsecure();
#endif
return *this;
}
espMqttClientSecure& espMqttClientSecure::setCACert(const char* rootCA) {
#if defined(EMC_CLIENT_SECURE)
_client.client.setCACert(rootCA);
#endif
return *this;
}
espMqttClientSecure& espMqttClientSecure::setCertificate(const char* clientCa) {
#if defined(EMC_CLIENT_SECURE)
_client.client.setCertificate(clientCa);
#endif
return *this;
}
espMqttClientSecure& espMqttClientSecure::setPrivateKey(const char* privateKey) {
#if defined(EMC_CLIENT_SECURE)
_client.client.setPrivateKey(privateKey);
#endif
return *this;
}
espMqttClientSecure& espMqttClientSecure::setPreSharedKey(const char* pskIdent, const char* psKey) {
#if defined(EMC_CLIENT_SECURE)
_client.client.setPreSharedKey(pskIdent, psKey);
#endif
return *this;
}