I am trying to use a SSL/TLS encryption connection with openssl between a raspberry and the mosquitto broker. To do so, I have entered the following commands:
openssl genrsa -des3 -out ca.key 2048Then I have move the ca_certificates folder under /etc/mosquitto/ca_certificates and also the server certificate and key in the certs folder.
Now, I try to publish a message such as mosquitto_pub --cafile ca.crt -h localhost -t Valve -m 2, but the following error appears:
Error: Connection refused
What I have in the mosquitto.conf is:
cafile ca.crtDo you have any idea of where is my error? I think it might be related to the fact that I didn't use the same common name for the CA and the server certificate. If this is the problems, how could I fix it?