【发布时间】:2018-03-29 10:32:41
【问题描述】:
我正在尝试使用 TLS1.2 设置 mosquitto MQTT 服务器,并使用 Let 加密证书。
我已经安装了 mosquitto 并设置了让 encrpypt。我的 /etc/mosquitto/conf.d/default.conf 是
listener 1883 localhost
listener 8883
certfile /etc/letsencrypt/live/mqtt.atom.net/cert.pem
cafile /etc/letsencrypt/live/mqtt.atom.net/chain.pem
keyfile /etc/letsencrypt/live/mqtt.atom.net/privkey.pem
在服务器上运行 mosquitto 我可以成功发布和订阅消息
Sub
mosquitto_sub -h localhost -t test
hello
Pub
mosquitto_pub -h mqtt.atom.net -t test -m "hello" -p 8883 --capath /etc/ssl/certs/
来自 Internet 上的另一个系统(或 ESP32) - 尝试建立 TLS 连接时出现错误
mosquitto_pub -h mqtt.atom.net -t test -m "hello again" -p 8883
Error: The connection was lost.
我需要将什么证书/证书传递给 mosquitto_pub?
【问题讨论】: