-
Notifications
You must be signed in to change notification settings - Fork 16
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
Allow MQTT connection to be TLS encrypted #90
Comments
Sure, this can be implemented. Probably wouldn't even take that long. Biggest barrier would be to setup a server with TLS support for testing. Is there some good tutorial how to do that? |
I tried to implement this myself, but this is the first time I fumble with rust, so I couldn't get thinks very far...
I think Regarding a TLS supported MQTT server you could try testing with https://www.hivemq.com/products/mqtt-cloud-broker/
|
I think I got this to work. The code change is PR #93, but it needs testing. As of writing it is only tested on macOS/X86. And should work, but with TLS things might be funny on other platforms. Btw, I implemented this using a free instance from hivemq and their web client. |
Also tested on rPi4/Ubuntu successfully |
Thanks! This does not work for me, but I think it is because of my self-signed cert I'm currently running with :( I have all the certs in the right place, but something is going wrong. The server is showing me What I did notice though: When running in the docker container, there are no system CAs installed in /etc/ssl/certs. Have you tried running this PR in a container? I added a |
Haven't tried to run it in a container, yet. But adding system CAs sounds like a necessary step. |
I had some time to test this and can confirm this works with a mosquitto server using letsencrypt certificates.
|
I have a MQTT server which allows access via TLS only. Just setting the port to 8883 results in a lot of complaining by the server as hms-mqtt-publisher seems to reconnect really fast and often, but not with TLS enabled.
Is there a way this could be implemented and exposed to the config.toml?
The text was updated successfully, but these errors were encountered: