Skip to content

Commit b5ef846

Browse files
committed
Merge branch 'bugfix/fix_https_skip_cert_fail' into 'main'
Fix HTTPS skip cert fail See merge request adf/esp-webrtc-solution!27
2 parents c36bfbf + dea6cf6 commit b5ef846

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

components/esp_webrtc/impl/apprtc_signal/https_client.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
#include "esp_log.h"
2828
#include "https_client.h"
2929
#include "esp_tls.h"
30+
#include <sdkconfig.h>
31+
#ifdef CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
3032
#include "esp_crt_bundle.h"
33+
#endif
3134
#include "esp_http_client.h"
3235

3336
static const char *TAG = "HTTPS_CLIENT";
@@ -114,7 +117,9 @@ int https_send_request(const char *method, char **headers, const char *url, char
114117
esp_http_client_config_t config = {
115118
.url = url,
116119
.event_handler = _http_event_handler,
120+
#ifdef CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
117121
.crt_bundle_attach = esp_crt_bundle_attach,
122+
#endif
118123
.user_data = &info,
119124
.timeout_ms = 10000, // Change default timeout to be 10s
120125
};

components/esp_webrtc/impl/apprtc_signal/signal_default.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
#include <esp_system.h>
3737
#include <sys/param.h>
3838
#include "esp_netif.h"
39+
#include <sdkconfig.h>
40+
#ifdef CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
3941
#include "esp_crt_bundle.h"
42+
#endif
4043
#include "esp_websocket_client.h"
4144
#include "esp_tls.h"
4245

@@ -417,7 +420,9 @@ int create_wss(wss_sig_t *sg)
417420
esp_websocket_client_config_t ws_cfg = {
418421
.uri = sg->client_info.wss_url,
419422
.headers = origin,
423+
#ifdef CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
420424
.crt_bundle_attach = esp_crt_bundle_attach,
425+
#endif
421426
// .keep_alive_enable = true,
422427
.reconnect_timeout_ms = 60 * 1000,
423428
// .ping_interval_sec = 30,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
3+
4+
CONFIG_SPIRAM_SPEED_200M=y
5+
6+
# If you use serial JTAG turn on this option
7+
#CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
8+
9+
# Use camera SC2336
10+
CONFIG_CAMERA_SC2336=y
11+
CONFIG_CAMERA_SC2336_MIPI_RAW10_1920x1080_25FPS_2_LANE=y
12+
13+
# Enable ISP pipelines
14+
CONFIG_ESP_VIDEO_ENABLE_ISP_PIPELINE_CONTROLLER=y
15+
16+
CONFIG_IDF_SLAVE_TARGET="esp32c6"
17+
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y

solutions/whip_demo/main/settings.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,24 @@ extern "C" {
1616
/**
1717
* @brief Board name setting refer to `codec_board` README.md for more details
1818
*/
19+
#if CONFIG_IDF_TARGET_ESP32P4
1920
#define TEST_BOARD_NAME "ESP32_P4_DEV_V14"
21+
#else
22+
#define TEST_BOARD_NAME "S3_Korvo_V2"
23+
#endif
2024

2125
/**
2226
* @brief Video resolution settings
2327
*/
24-
#define VIDEO_WIDTH 1024
25-
#define VIDEO_HEIGHT 600
28+
#if CONFIG_IDF_TARGET_ESP32P4
29+
#define VIDEO_WIDTH 1920
30+
#define VIDEO_HEIGHT 1080
31+
#define VIDEO_FPS 25
32+
#else
33+
#define VIDEO_WIDTH 320
34+
#define VIDEO_HEIGHT 240
2635
#define VIDEO_FPS 10
36+
#endif
2737

2838
/**
2939
* @brief Set for wifi ssid

solutions/whip_demo/sdkconfig.defaults.esp32p4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_SPIRAM_SPEED_200M=y
88

99
# Use camera SC2336
1010
CONFIG_CAMERA_SC2336=y
11-
CONFIG_CAMERA_SC2336_MIPI_RAW8_1024x600_30FPS=y
11+
CONFIG_CAMERA_SC2336_MIPI_RAW10_1920x1080_25FPS_2_LANE=y
1212

1313
# Enable ISP pipelines
1414
CONFIG_ESP_VIDEO_ENABLE_ISP_PIPELINE_CONTROLLER=y

0 commit comments

Comments
 (0)