TLS Handshake Fails with esp_crt_bundle_attach in ESP-IDF v5.5 (ESP32-C3/C5)

NavitTripathi
Posts: 5
Joined: Thu Jul 17, 2025 6:34 am

TLS Handshake Fails with esp_crt_bundle_attach in ESP-IDF v5.5 (ESP32-C3/C5)

Postby NavitTripathi » Mon Aug 04, 2025 7:20 am

Hi Everyone,

I'm using esp_crt_bundle_attach for SSL certificate verification in a POST request.
The same code works perfectly in ESP-IDF v5.2(on ESP32-C3), but in v5.5 (on both ESP32-C3 and C5), it fails with:

E (xxxxx) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x2700
I (xxxxx) esp-tls-mbedtls: Failed to verify peer certificate!

Verified:

esp_crt_bundle_attach used correctly
[ esp_tls_cfg_t cfg = {
.ciphersuites_list = server_supported_ciphersuites,
.crt_bundle_attach = esp_crt_bundle_attach,
}; ]
TLS config unchanged
Certificate bundle enabled in menuconfig
Flash size and partitions are fine
SNTP time is synced before TLS
idf.py fullclean done

Issue:
Has anything changed in ESP-IDF v5.5 related to certificate bundles or TLS that could cause this? Any fixes or workarounds?

Thanks!

Who is online

Users browsing this forum: meta-externalagent, PetalBot and 5 guests