Quantcast
Viewing all articles
Browse latest Browse all 1515

esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference

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 referenceE (55889) esp-tls-mbedtls: Failed to set client configurations, returned [0x8017] (ESP_ERR_MBEDTLS_SSL_SETUP_FAILED)E (55900) esp-tls: create_ssl_handle failedE (55905) esp-tls: Failed to open new connectionE (55910) transport_base: Failed to open a new connectionE (55919) HTTP_CLIENT: Connection failed, sock < 0E (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

FirstI 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 -0x6C00I (128543) esp-tls-mbedtls: Certificate verified.E (128544) esp-tls: Failed to open new connectionE (128549) transport_base: Failed to open a new connectionE (128559) HTTP_CLIENT: Connection failed, sock < 0E (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


Viewing all articles
Browse latest Browse all 1515

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>