I am having this following error when accessing https URL
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
this is the config
esp_http_client_config_t config_get_api =
{
.url=URL,
.transport_type = HTTP_TRANSPORT_OVER_SSL,
.cert_pem = esp_crt_bundle_attach,
};
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
esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x6C00
-
- Posts: 2
- Joined: Wed Jul 31, 2024 6:02 am
-
- Posts: 24
- Joined: Wed Jul 06, 2022 8:36 am
Re: esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x6C00
Hi @askash kadam,
I think you should use the element for the config to attach the cert bundle instead of . The element expects a certificate string whereas expects a callback function pointer.
Thank you!
I think you should use the
Code: Select all
.crt_bundle_attach
Code: Select all
.cert_pem
Code: Select all
.cert_pem
Code: Select all
.crt_bundle_attach
Thank you!
-
- Posts: 2
- Joined: Wed Jul 31, 2024 6:02 am
Re: esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x6C00
This issue is resolved.
Thank you for suggestion ESP_harshal it helped with CA Certificate configurate later, I used dedicated PEM Certificate at end.
Also the main issue here was because of wrong callback that was registered with "mbedtls_ssl_send_t *MBEDTLS_PRIVATE(f_send);"
Thank you for suggestion ESP_harshal it helped with CA Certificate configurate later, I used dedicated PEM Certificate at end.
Also the main issue here was because of wrong callback that was registered with "mbedtls_ssl_send_t *MBEDTLS_PRIVATE(f_send);"
Who is online
Users browsing this forum: No registered users and 305 guests