我想建立从ESP8266到mosquitto MQTT服务器的TLS连接。带蚊子的ESP8266失败TLS握手
我使用Adafruit的example INO有WiFiClientSecure,它成功地连接到我的WiFi正常工作与其他MQTT服务器(如iot.eclipse.org:8883)
只是当我试图连接到我的自己mosquitto例如,它不能 在mosquitto日志显示:
OpenSSL Error: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number
我mosquitto.conf看起来像这样
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
allow_anonymous false
listener 51883
password_file /etc/mosquitto/pwfile
conf.d包含:
cafile /etc/letsencrypt/live/<my-domain>/fullchain.pem
certfile /etc/letsencrypt/live/<my-domain>/fullchain.pem
keyfile /etc/letsencrypt/live/<my-domain>/privkey.pem
的证书使用让我们从MQTT - 达什(Adnroid内APP)encrypt-连接产生完美的作品。
我想不通哪个TLS版本的WiFiClientSecure使用或如何定义它。
添加mosquitto.conf的其余部分(在/ etc可能是第二个文件/ mosquitto /conf.d),因为在那里包含的任何东西都没有TLS配置 – hardillb
所以你似乎没有限制蚊子方面(tls_version),它应该在默认模式下支持1.0,1.1和1.2。我会试着研究如何让openssl在详细模式下运行或者运行wireshark来查看线路上实际发送的内容。 – hardillb