mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(esp-tls): Fix the https_request example build for esp-wolfssl
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
menu "Example Configuration"
|
menu "Example Configuration"
|
||||||
|
|
||||||
|
config EXAMPLE_USING_ESP_TLS_MBEDTLS
|
||||||
|
bool
|
||||||
|
depends on ESP_TLS_USING_MBEDTLS
|
||||||
|
default y
|
||||||
|
|
||||||
config EXAMPLE_CLIENT_SESSION_TICKETS
|
config EXAMPLE_CLIENT_SESSION_TICKETS
|
||||||
bool "Enable Client session ticket support"
|
bool "Enable Client session ticket support"
|
||||||
default n
|
default n
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* 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>
|
#include <string.h>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include "esp_tls.h"
|
#include "esp_tls.h"
|
||||||
#include "sdkconfig.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"
|
#include "esp_crt_bundle.h"
|
||||||
#endif
|
#endif
|
||||||
#include "time_sync.h"
|
#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)
|
static void https_get_request_using_crt_bundle(void)
|
||||||
{
|
{
|
||||||
ESP_LOGI(TAG, "https_request using crt bundle");
|
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);
|
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)
|
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);
|
https_get_request_using_already_saved_session(server_url);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
|
#if CONFIG_MBEDTLS_CERTIFICATE_BUNDLE && CONFIG_EXAMPLE_USING_ESP_TLS_MBEDTLS
|
||||||
https_get_request_using_crt_bundle();
|
https_get_request_using_crt_bundle();
|
||||||
#endif
|
#endif
|
||||||
ESP_LOGI(TAG, "Minimum free heap size: %" PRIu32 " bytes", esp_get_minimum_free_heap_size());
|
ESP_LOGI(TAG, "Minimum free heap size: %" PRIu32 " bytes", esp_get_minimum_free_heap_size());
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
CONFIG_MBEDTLS_HAVE_TIME_DATE=y
|
CONFIG_MBEDTLS_HAVE_TIME_DATE=y
|
||||||
CONFIG_LWIP_SNTP_MAX_SERVERS=2
|
CONFIG_LWIP_SNTP_MAX_SERVERS=2
|
||||||
|
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
|
||||||
|
Reference in New Issue
Block a user