FAILED: esp-idf/mbedtls/x509_ crt_ Solutions to bundle error reporting and information sources

When compiling a project with esp-idf, the following errors are encountered:

FAILED: esp-idf/mbedtls/x509_crt_bundle
cmd.exe /C "cd /D C:\Users\yahsa\Desktop\NTU\FYP\ESP_Workspace\blink\build\esp-idf\mbedtls && C:\Users\yahsa\esp.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:/Users/yahsa/esp/esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py --input C:/Users/yahsa/esp/esp-idf/components/mbedtls/esp_crt_bundle/cacrt_all.pem -q"
gen_crt_bundle.py: Invalid certificate in C:/Users/yahsa/esp/esp-idf/components/mbedtls/esp_crt_bundle/cacrt_all.pem
Invalid certificate
ninja: build stopped: subcommand failed.

This problem is because cacrt_ A certificate in the all.pem file recently expired (September 30), resulting in the failure of compiling the project.

The solution is to enter this command idf.py build before compiling the project, enter the idf.py menuconfig for project configuration, enter the certificate bundle setting according to the following path, and cancel the enable trusted root certificate bundle option, that is, the trusted root certificate bundle will not be enabled in this project.

(Top) > Component config > mbedTLS > Certificate Bundle-> Enable trusted root certificate bundle

Using esp-idf plug-in in vscode is the same method. Open the project and click the gear at the bottom left ⚙ Icon for engineering configuration.

Solution information source – GitHub link

Similar Posts: