mosquitto_pub gives the following error: 1408F10B: SSL routines: ssl3_get_record: wrong version number
Solution 1:
To get mosquitto_pub
to attempt to start a SSL connection you need to provide either --cafile
or --capath
that points to the location of the CA certificates to verify the broker.
Without these options neither mosquitto_pub
or mosquitto_sub
will not attempt to start a SSL session and instead try and connect with a normal unencrypted MQTT connection.
On most Linux distributions you can use --capath
and point to /etc/ssl/certs
directory