Merge branch 'fix/https_request_example_build_with_esp_wolfssl_v5.1' into 'release/v5.1'

fix(esp-tls): Fix the https_request example build for esp-wolfssl (v5.1)

See merge request espressif/esp-idf!26735
This commit is contained in:
Mahavir Jain 2023-11-20 11:07:36 +08:00
commit fcd0b8b8e9
3 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,10 @@
menu "Example Configuration"
config EXAMPLE_USING_ESP_TLS_MBEDTLS
bool
depends on ESP_TLS_USING_MBEDTLS
default y
config EXAMPLE_CLIENT_SESSION_TICKETS
bool "Enable Client session ticket support"
default n

View File

@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*
* SPDX-FileContributor: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2015-2023 Espressif Systems (Shanghai) CO LTD
*/
#include <string.h>
@ -40,7 +40,7 @@
#include "esp_tls.h"
#include "sdkconfig.h"
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE && CONFIG_EXAMPLE_USING_ESP_TLS_MBEDTLS
#include "esp_crt_bundle.h"
#endif
#include "time_sync.h"
@ -164,7 +164,7 @@ exit:
}
}
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE && CONFIG_EXAMPLE_USING_ESP_TLS_MBEDTLS
static void https_get_request_using_crt_bundle(void)
{
ESP_LOGI(TAG, "https_request using crt bundle");
@ -173,7 +173,7 @@ static void https_get_request_using_crt_bundle(void)
};
https_get_request(cfg, WEB_URL, HOWSMYSSL_REQUEST);
}
#endif // CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
#endif // CONFIG_MBEDTLS_CERTIFICATE_BUNDLE && CONFIG_EXAMPLE_USING_ESP_TLS_MBEDTLS
static void https_get_request_using_cacert_buf(void)
{
@ -253,7 +253,7 @@ static void https_request_task(void *pvparameters)
https_get_request_using_already_saved_session(server_url);
#endif
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE && CONFIG_EXAMPLE_USING_ESP_TLS_MBEDTLS
https_get_request_using_crt_bundle();
#endif
ESP_LOGI(TAG, "Minimum free heap size: %" PRIu32 " bytes", esp_get_minimum_free_heap_size());

View File

@ -1,2 +1,3 @@
CONFIG_MBEDTLS_HAVE_TIME_DATE=y
CONFIG_LWIP_SNTP_MAX_SERVERS=2
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y