I am working on ESP32S3 microcontroller with ESP32-IDF V5.1.2 where I am getting following error log
E (55888) esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference
E (55889) esp-tls-mbedtls: Failed to set client configurations, returned [0x8017] (ESP_ERR_MBEDTLS_SSL_SETUP_FAILED)
E (55900) esp-tls: create_ssl_handle failed
E (55905) esp-tls: Failed to open new connection
E (55910) transport_base: Failed to open a new connection
E (55919) HTTP_CLIENT: Connection failed, sock < 0
E (55922) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
The same code works fine when accessing http URL but when used https URL this is the error code I get
First
I thought it is because I didn’t provide CA certificate so I added it in code. Then I get this following error log
E (128542) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x6C00
I (128543) esp-tls-mbedtls: Certificate verified.
E (128544) esp-tls: Failed to open new connection
E (128549) transport_base: Failed to open a new connection
E (128559) HTTP_CLIENT: Connection failed, sock < 0
E (128561) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
When I tracked -0x6C00 code in IDF it says
/** Internal error (eg, unexpected failure in lower-level module) */
#define MBEDTLS_ERR_SSL_INTERNAL_ERROR -0x6C00
Is it because the method I used to create CA certificate is wrong , then what is the correct one and/or there are other parameters that I have to set in code to make it work for https. with CA certificate.
Thank You
marshal clock is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.