ssl - 使用 TLS 保护 arduino 到 mosquitto 的连接

标签 ssl arduino client mqtt mosquitto

我正在尝试确保 arduino pubsub 之间的连接安全通过 TLS 的客户端和 mosquitto 代理(在公共(public)服务器上运行)。

通常(在 Windows 等上),我可以在提供证书文件时像下面那样发布/订阅。 (证书和 key 文件在我的工作目录中)。

mosquitto_pub -h myhost.com -p 8883 -t "/test"-m "your secure message"--cafile ca.crt --cert client.crt --key client.key

mosquitto_sub -h myhost.com -p 8883 -t "/test"--cafile ca.crt --cert client.crt --key client.key

但是有没有办法在 arduino 中做到这一点?

最佳答案

你的 pubsub MQTT 客户端不支持开箱即用的 SSL/TLS。您可以尝试与一些轻量级 SSL/TLS 库集成。

很少有嵌入式 SSL 库:
https://wolfssl.com/wolfSSL/Products-wolfssl.html
http://www.matrixssl.org/

或者您可以选择 Paho MQTT Client - MQTTClient 的预建 Arduino 端口。它支持 MQTT V3.1.1、SSL/TLS、QOS-2 Support 等,这些在 pubsub 中不可用。客户。

关于ssl - 使用 TLS 保护 arduino 到 mosquitto 的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37916921/

相关文章:

ios - 如何在我的 iPhone 中为我的网站添加有效且受信任的安全证书?

Arduino SoftwareSerial类的C++继承

java - MemCachedClient get 在设置相同的键后返回 null

ssl - 在lighttpd上配置https

laravel - nginx - (http/https) 非 www 到 www 重定向

java - Arduino ADK 无法通过 USB 从 Galaxy S II 接收数据

php - 将数据从树莓派发送到Web服务器

view - 如何将Perforce仓库位置转换为客户端 View 位置

java - 带有 Java 套接字的 HTTP 客户端

php - 启用 apache ssl 模块后 Wamp 图标变成橙色,未安装 skype