-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL Support #18
Comments
No, the library does not support SSL/TLS. To be honest, I haven't even checked username/password authentication. |
Doesn't look good: esp8266/Arduino#43 |
Right I will do some testing of the authentication this weekend. Lets get that resolved/verified as working. I see the official MQTT client claims to support SSL and maybe we can have a look at that for some guidelines on how to implement. |
Just dropping a note here that with staging version of ESP8266 Arduino core, it is now possible to use MQTT over TLS. |
Thanks for the info
|
Is there an example sketch for MQTT over TLS please? or is it as simple as WiFiClientSecure client; and proceed as usual? |
@mtnbrit I've tried that and it doesn't seem to work. I'm not sure if I've set up my broker correctly though. |
Yep it crashes the esp for me, so i think the issue is client-side. Perhaps @igrr can chime in with a working example? |
Folks, any progress on getting TLS to work? I can test anything needed on client or broker. |
@Imroy please consider using |
I got it working with SSL (+ user/pass authentication) by modifying a couple of functions. The set_auth method is already present in MQTT.h. Problem is, the ESP8266 crashes when using username and password authentication in non-SSL mode (SSL works fine) and, in either case, floods the console with the error "please start sntp first!" EDIT: all you need to do to get SSL working is declare |
Excellent, thank you very much! |
@ftruzzi, @probonopd, @mtnbrit, how did you get this to work? I'm getting the following error:
I'm not sure where to define and verify the cipher (which I assumed to be the SHA1 fingerprint). I've define the fingerprint as a constant C string but where does this get included in the PubSubClient instance? I tried verifying the fingerprint it on the WiFiClientSecure instance but that didn't work. Here's a breakdown of my code:
|
on an esp32, this connection string worked: client.connect(clientId.c_str(), "user", "pass") I'd suggest commenting out some of the extra bits, or simplify and call a basic |
thanks @tedder, it was a badly configured user/password in mosquitto that caused the issue for me. fwiw the chainable setter methods do work, as with set_auth. |
Hi
Started using your library and it is easy and fun to work with. Excellent work. Nice to know you are close by in NSW. I just wanted to check with you if the library handles SSL yet? I thought asking a question would be easier than bashing my head against a brick wall for while.
If not I am more than willing to help in getting this done just my C/C++ skills is little rusty so the going might be a little slow...
N
The text was updated successfully, but these errors were encountered: