mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -344,6 +344,12 @@ void esp_transport_ssl_enable_global_ca_store(esp_transport_handle_t t)
|
||||
ssl->cfg.use_global_ca_store = true;
|
||||
}
|
||||
|
||||
void esp_transport_ssl_set_tls_version(esp_transport_handle_t t, esp_tls_proto_ver_t tls_version)
|
||||
{
|
||||
GET_SSL_FROM_TRANSPORT_OR_RETURN(ssl, t);
|
||||
ssl->cfg.tls_version = tls_version;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP_TLS_PSK_VERIFICATION
|
||||
void esp_transport_ssl_set_psk_key_hint(esp_transport_handle_t t, const psk_hint_key_t *psk_hint_key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user