Code: Select all
E (6128) esp-tls: mbedtls_ssl_handshake returned -0x2700
I (6128) esp-tls: Failed to verify peer certificate!
I (6128) esp-tls: verification info: ! The certificate Common Name (CN) does not match with the expected CN
! The certificate is not
E (6148) esp-tls: Failed to open new connection
E (6148) TRANS_SSL: Failed to open a new connection
E (6158) MQTT_CLIENT: Error transport connect
E (6168) WIFI: MQTT_EVENT_DISCONNECTED
openssl s_client -showcerts -connect myhost.com:8883 </dev/null 2>/dev/null|openssl x509 -outform PEM >myhost.pem
Without the pem file it works but after random times mqtt disconnects giving tls error and the only way to reconnect is disconnect/reconnect to wifi or reboot esp32
In the same moments are active WiFi, BLE, sntp client