Skip to content
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

TLS connection to Mosquitto MQTT broker not working #107

Open
kisa72 opened this issue Jan 14, 2023 · 0 comments
Open

TLS connection to Mosquitto MQTT broker not working #107

kisa72 opened this issue Jan 14, 2023 · 0 comments

Comments

@kisa72
Copy link

kisa72 commented Jan 14, 2023

Hi,

I'm trying to get TLS connectivity between my Windows PC runnning mqtt-spy and my Debian server running the Mosquitto broker.
They both connect fine with no security and with user/password security. So the main operation and connectivity is fine.
Then I try to connect using the TLS setup I mention below, MQTT-SPY just times out and fails to connect.

Through terminals on the same MQTT server I can successfully communicate using the certs using the mosquitto_sub and mosquitto_pub commands:-

Terminal1 - mosquitto_sub -h 192,168.0.206 -p 8883 -t test --cafile /home/certs/ca.crt --tls-version tlsv1.2
Terminal2 - mosquitto_pub -h 127.0.0.1 -t test -m "Hello"

When using MQTT-SPY for TLS, I use the following setup:-
I go into the Security tab and TLS tab,
TLS/SSL mode: CA certificate,
Protocol: TLSv1.2,
CA certificate file: C:\User\me\Downloads\CERTS\ca.crt

The ca.crt is the same one being used in the mosquitto_sub command above, but copied over to Windows via FTP (FileZilla).

I'm assuming I'm doing something wrong and that's it's probably minor due to a lack of understanding around TLS security.

Any help would be great thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant