In a MQTT connection how can I recognize the use of an expired certificate from
esp_mqtt_connect_return_code_t and esp_mqtt_error_type_t values?
I haven't expired certificates so I don't know how I can detect this situation
How can recognize an expired certificate on MQTT connection
-
- Posts: 5
- Joined: Thu Sep 15, 2022 3:14 pm
Re: How can recognize an expired certificate on MQTT connection
There is no API to get the reason code you want. But you can try add some log in esp_mbedtls_verify_certificate in esp_tls_mbedtls.c to print flags value. If the flags value is MBEDTLS_X509_BADCERT_EXPIRE, it means the server CA certificate is expired.
Who is online
Users browsing this forum: No registered users and 71 guests