mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Merge branch 'feature/upgrade_mbedtls_to_v2.16.11' into 'master'
mbedtls: upgrade to release v2.16.11 Closes IDF-3429 See merge request espressif/esp-idf!14294
This commit is contained in:
Submodule components/mbedtls/mbedtls updated: 99c88bb7bd...6465247f67
@@ -168,6 +168,9 @@ void server_task(void *pvParameters)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Signal that server is up and hence client task can start now */
|
||||||
|
xSemaphoreGive(*sema);
|
||||||
|
|
||||||
bool connected = false;
|
bool connected = false;
|
||||||
while (!exit_flag) {
|
while (!exit_flag) {
|
||||||
|
|
||||||
@@ -272,8 +275,6 @@ int client_task(const uint8_t *bundle, esp_crt_validate_res_t *res)
|
|||||||
esp_crt_bundle_set(bundle);
|
esp_crt_bundle_set(bundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ESP_LOGI(TAG, "Connecting to %s:%s...", SERVER_ADDRESS, SERVER_PORT);
|
ESP_LOGI(TAG, "Connecting to %s:%s...", SERVER_ADDRESS, SERVER_PORT);
|
||||||
if ((ret = mbedtls_net_connect(&client.client_fd, SERVER_ADDRESS, SERVER_PORT, MBEDTLS_NET_PROTO_TCP)) != 0) {
|
if ((ret = mbedtls_net_connect(&client.client_fd, SERVER_ADDRESS, SERVER_PORT, MBEDTLS_NET_PROTO_TCP)) != 0) {
|
||||||
ESP_LOGE(TAG, "mbedtls_net_connect returned -%x", -ret);
|
ESP_LOGE(TAG, "mbedtls_net_connect returned -%x", -ret);
|
||||||
@@ -319,13 +320,16 @@ TEST_CASE("custom certificate bundle", "[mbedtls]")
|
|||||||
|
|
||||||
test_case_uses_tcpip();
|
test_case_uses_tcpip();
|
||||||
|
|
||||||
xSemaphoreHandle exit_sema = xSemaphoreCreateBinary();
|
xSemaphoreHandle signal_sem = xSemaphoreCreateBinary();
|
||||||
|
TEST_ASSERT_NOT_NULL(signal_sem);
|
||||||
|
|
||||||
exit_flag = false;
|
exit_flag = false;
|
||||||
xTaskCreate(server_task, "server task", 8192, &exit_sema, 10, NULL);
|
xTaskCreate(server_task, "server task", 8192, &signal_sem, 10, NULL);
|
||||||
|
|
||||||
// Wait for the server to start up
|
// Wait for the server to start up
|
||||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
if (!xSemaphoreTake(signal_sem, 10000 / portTICK_PERIOD_MS)) {
|
||||||
|
TEST_FAIL_MESSAGE("signal_sem not released, server start failed");
|
||||||
|
}
|
||||||
|
|
||||||
/* Test with default crt bundle that doesnt contain the ca crt */
|
/* Test with default crt bundle that doesnt contain the ca crt */
|
||||||
client_task(NULL, &validate_res);
|
client_task(NULL, &validate_res);
|
||||||
@@ -337,11 +341,11 @@ TEST_CASE("custom certificate bundle", "[mbedtls]")
|
|||||||
|
|
||||||
exit_flag = true;
|
exit_flag = true;
|
||||||
|
|
||||||
if (!xSemaphoreTake(exit_sema, 10000 / portTICK_PERIOD_MS)) {
|
if (!xSemaphoreTake(signal_sem, 10000 / portTICK_PERIOD_MS)) {
|
||||||
TEST_FAIL_MESSAGE("exit_sem not released by server task");
|
TEST_FAIL_MESSAGE("signal_sem not released, server exit failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
vSemaphoreDelete(exit_sema);
|
vSemaphoreDelete(signal_sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
|
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
|
||||||
|
Reference in New Issue
Block a user