EspMQTTClient
EspMQTTClient copied to clipboard
Add support for SSL/TLS
Thank You。
Unfortunatly, there is no SSL/TLS support yet with this lib. I will add that to the TODO list. Here is a PubSubClient issue discussing how you can achieve this with the PubSubClient lib : https://github.com/knolleary/pubsubclient/issues/462
Thank you for your reply, happy to look forward to the arrival of new features. 😊
This feature would be very welcome! I hope it's on first line of your todo list... :)
Yes please! Yes please!
Hi, Updating the library is in fact quite simple to make it work in TLS. It's probably quick and dirty, but works for me.
Change the include from
#include <WiFiClient.h>
to #include <WiFiClientSecure.h>
Then the declaration:
WiFiClient mWifiClient;
to WiFiClientSecure mWifiClient;
and move it to public.
Then the library will use the secure library, and give you access from your code to the mWifiClient object where you'll be able to change settings and set properties such as:
client.mWifiClient.setFingerprint(fingerprint); // <-- Set the SHA1 fingerprint to verify remote server
// Alternative: client.mWifiClient.setInsecure();
Works for my mosquitto in mqtts.
+1. Please add support for TLS (ideally server and client certs). Thanks.
I would also really appreciate SSL support for HASS-YAAP :)
+1. Please add support for TLS! Thanks!
+1 please
There is no need in adding "+1" comments. That does not change anything. You could instead provide Pull Requests. ;)
If someone takes time to implement this, I will take the time to review and test. However, I don't think I will implement this by myself. I work on this lib for free and I don't have as many free time as before. Also, as almost all of my home automation devices are now working on ZigBee, I don't use this lib as much as before. It became hard for me to test new functionnalities. Thank you for your comprehension.