weixin_43866967
如也。
2019-03-15 12:02

MQTT TLS加密传输证书验证不过去。

  • c语言

嵌入式设备客户端:

./mosquitto_sub -h 172.22.50.2 -u sub_client -P 123456 -p 8883 -t hh --cafile ./ca.crt --tls-version tlsv1

linux服务器:

mosquitto -c ./mosquitto.conf -v

mosquitto.conf

pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
port 8883
cafile /etc/mosquitto/myca/ca.crt
certfile /etc/mosquitto/myca/server.crt
keyfile /etc/mosquitto/myca/server.key
tls_version tlsv1
``

服务器报错:

1552620704: OpenSSL Error: error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error
1552620704: OpenSSL Error: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答

为你推荐

换一换