If I test it with the default broker "mqtts://mqtt.eclipse.org:8883" and default certificate "mqtt_eclipse_org.pem"
It works correctly.
If I change the broker with mqtts://test.mosquitto.org:8883
( https://test.mosquitto.org/ ) and change the certificate using (mosquitto.org.crt (PEM format), it fails and gave me TLS errors:
Code: Select all
mbedtls:ssl_tls.c:5757 x509_verify_cert() returned -9984 (-0x2700)
Code: Select all
esp-tls: mbedtls_ssl_handshake returned .0x2700
esp-tls: Failed to verify peer certificate!
esp-tls: verification info: ! The certificate Common Name (CN) does not match with the expected CN