Merge branch 'refactor/https_mbedtls_example_linux' into 'master'

Refactor https_mbedtls example for linux target

See merge request espressif/esp-idf!28719
This commit is contained in:
Jakob Hasse
2024-01-31 09:53:31 +08:00
3 changed files with 7 additions and 12 deletions

View File

@@ -101,6 +101,8 @@ examples/protocols/http_server/ws_echo_server:
examples/protocols/https_mbedtls: examples/protocols/https_mbedtls:
<<: *default_dependencies <<: *default_dependencies
enable:
- if: INCLUDE_DEFAULT == 1 or IDF_TARGET == "linux"
disable: disable:
- if: IDF_TARGET == "esp32p4" - if: IDF_TARGET == "esp32p4"
temporary: true temporary: true

View File

@@ -1,11 +1,11 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | Linux |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | | ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | ----- |
# HTTP server with TLS support using mbedTLS # HTTP connection with TLS support using mbedTLS
(See the README.md file in the upper level 'examples' directory for more information about examples.) (See the README.md file in the upper level 'examples' directory for more information about examples.)
Simple HTTPS example that uses mbedTLS to establish a secure socket connection using the certificate bundle with two custom certificates added for verification: Simple HTTPS request example that uses mbedTLS to establish a secure socket connection using the certificate bundle with two custom certificates added for verification:
## How to use example ## How to use example

View File

@@ -9,14 +9,13 @@
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* SPDX-FileContributor: 2015-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileContributor: 2015-2024 Espressif Systems (Shanghai) CO LTD
*/ */
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "esp_wifi.h"
#include "esp_event.h" #include "esp_event.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_system.h" #include "esp_system.h"
@@ -24,12 +23,6 @@
#include "protocol_examples_common.h" #include "protocol_examples_common.h"
#include "esp_netif.h" #include "esp_netif.h"
#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include "lwip/netdb.h"
#include "lwip/dns.h"
#include "mbedtls/platform.h" #include "mbedtls/platform.h"
#include "mbedtls/net_sockets.h" #include "mbedtls/net_sockets.h"
#include "mbedtls/esp_debug.h" #include "mbedtls/esp_debug.h"