fix(esp-tls): Use TLS 1.2 and TLS 1.3 simultaneously

This commit fixes the issue with TLS 1.2 connection when TLS 1.3 is
enabled in config.
This commit is contained in:
Harshit Malpani
2023-10-04 12:19:43 +05:30
parent ff03fd934a
commit 07f2cbeb0c
6 changed files with 72 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -61,6 +61,14 @@ void esp_transport_ssl_crt_bundle_attach(esp_transport_handle_t t, esp_err_t ((*
*/
void esp_transport_ssl_enable_global_ca_store(esp_transport_handle_t t);
/**
* @brief Set TLS protocol version for ESP-TLS connection
*
* @param t ssl transport
* @param[in] tls_version TLS version
*/
void esp_transport_ssl_set_tls_version(esp_transport_handle_t t, esp_tls_proto_ver_t tls_version);
/**
* @brief Set SSL client certificate data for mutual authentication (as PEM format).
* Note that, this function stores the pointer to data, rather than making a copy.