Merge branch 'feature/add_mbedtls_ciphersuites_set_get_api' into 'master'

esp-tls: Add config and api to set and get ciphersuites list

Closes IDF-7183

See merge request espressif/esp-idf!23320
This commit is contained in:
Mahavir Jain
2023-04-28 13:01:59 +08:00
7 changed files with 94 additions and 1 deletions

View File

@@ -804,6 +804,11 @@ esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls_cfg_t
ESP_LOGE(TAG, "You have to provide both clientcert_buf and clientkey_buf for mutual authentication");
return ESP_ERR_INVALID_STATE;
}
if (cfg->ciphersuites_list != NULL && cfg->ciphersuites_list[0] != 0) {
ESP_LOGD(TAG, "Set the ciphersuites list");
mbedtls_ssl_conf_ciphersuites(&tls->conf, cfg->ciphersuites_list);
}
return ESP_OK;
}
@@ -911,6 +916,11 @@ void esp_mbedtls_free_global_ca_store(void)
}
}
const int *esp_mbedtls_get_ciphersuites_list(void)
{
return mbedtls_ssl_list_ciphersuites();
}
#ifdef CONFIG_ESP_TLS_USE_SECURE_ELEMENT
static esp_err_t esp_init_atecc608a(uint8_t i2c_addr)
{