我在使用 esp-idf ESP32 上的 mqtt ssl 示例时遇到了一些问题。
示例:mqtt_ssl
如果我使用默认代理“mqtts://mqtt.eclipse.org:8883”和默认证书“mqtt_eclipse_org.pem”对其进行测试,它可以正常工作。
如果我使用 mqtts://test.mosquitto.org:8883 ( https://test.mosquitto.org/ )更改代理并使用 (mosquitto.org.crt (PEM 格式) 更改证书,它会失败并给我TLS 错误:
mbedtls:ssl_tls.c:5757 x509_verify_cert() returned -9984 (-0x2700)
esp-tls: mbedtls_ssl_handshake returned .0x2700
esp-tls: Failed to verify peer certificate!
failed to verify peer certificate
verification info: ! the certificate is not correctly signed by the trusted CA
我究竟做错了什么?