I hope all is well, and would like a suggestion how to set up the TLS on the local Broker.
This is a standalone VM server running Centos 8 and Mosquitto 1.6.15, installed using DNF package manager.
log_dest file /var/log/mosquitto/mosquitto.log
After the initial setup, the service is up and running, and is listening on port 8883.
● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/usr/lib/systemd/system/mosquitto.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2023-06-21 07:04:41 UTC; 5s ago
Process: 32755 ExecStartPre=/bin/chown mosquitto: /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 32752 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
Main PID: 32757 (mosquitto)
Tasks: 1 (limit: 204292)
└─32757 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Jun 21 07:04:41 mqtt_server systemd: Starting Mosquitto MQTT Broker…
Jun 21 07:04:41 mqtt_server systemd: Started Mosquitto MQTT Broker.
However when Im trying to run a test pub message, I face an error message.
mosquitto_pub -h 127.0.0.1 -p 8883 -t TestTopic --cafile /etc/mosquitto/tls/ca.crt -m TestMessage
OpenSSL Error: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
I’ve used an additional CA server (Microsoft Server) to generate new CA for Mosquitto, the error however remains the same.
I would really appreciate any suggestion or advice.
Thank you in advance