mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(https): Get TLS errors from http client
update PR update mr Update components/esp_http_client/esp_http_client.c Co-authored-by: Nilesh Kale <nilesh.kale@espressif.com>
This commit is contained in:
committed by
nilesh.kale
co-authored by
Nilesh Kale
parent
60cd7f506c
commit
81382d93a5
@@ -460,6 +460,23 @@ esp_err_t esp_http_client_set_user_data(esp_http_client_handle_t client, void *d
|
||||
*/
|
||||
int esp_http_client_get_errno(esp_http_client_handle_t client);
|
||||
|
||||
/**
|
||||
* @brief Returns last error in esp_tls with detailed mbedtls related error codes.
|
||||
* The error information is cleared internally upon return
|
||||
*
|
||||
* @param[in] client The esp_http_client handle
|
||||
* @param[out] esp_tls_error_code last error code returned from mbedtls api (set to zero if none)
|
||||
* This pointer could be NULL if caller does not care about esp_tls_code
|
||||
* @param[out] esp_tls_flags last certification verification flags (set to zero if none)
|
||||
* This pointer could be NULL if caller does not care about esp_tls_code
|
||||
*
|
||||
* @return
|
||||
* - ESP_FAIL if invalid parameters
|
||||
* - ESP_OK (0) if no error occurred
|
||||
* - specific error code (based on ESP_ERR_ESP_TLS_BASE) otherwise
|
||||
*/
|
||||
esp_err_t esp_http_client_get_and_clear_last_tls_error(esp_http_client_handle_t client, int *esp_tls_error_code, int *esp_tls_flags);
|
||||
|
||||
/**
|
||||
* @brief Set http request method
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user