Merge branch 'feature/add_support_for_ds_peripheral_on_ota_v5.0' into 'release/v5.0'

feat(esp_http_client): Added support for OTA using ds peripheral for TLS (v5.0)

See merge request espressif/esp-idf!26092
This commit is contained in:
Mahavir Jain
2023-09-28 02:35:37 +08:00
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -655,6 +655,12 @@ esp_http_client_handle_t esp_http_client_init(const esp_http_client_config_t *co
}
}
#if CONFIG_ESP_TLS_USE_DS_PERIPHERAL
if (config->ds_data != NULL) {
esp_transport_ssl_set_ds_data(ssl, config->ds_data);
}
#endif
if (config->client_key_pem) {
if (!config->client_key_len) {
esp_transport_ssl_set_client_key_data(ssl, config->client_key_pem, strlen(config->client_key_pem));

View File

@ -136,6 +136,9 @@ typedef struct {
int keep_alive_interval; /*!< Keep-alive interval time. Default is 5 (second) */
int keep_alive_count; /*!< Keep-alive packet retry send count. Default is 3 counts */
struct ifreq *if_name; /*!< The name of interface for data to go through. Use the default interface without setting */
#if CONFIG_ESP_TLS_USE_DS_PERIPHERAL
void *ds_data; /*!< Pointer for digital signature peripheral context, see ESP-TLS Documentation for more details */
#endif
} esp_http_client_config_t;
/**