espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.77k stars 7.44k forks source link

V3 ESP32 Arudino IDE library missing opensll (not supported https for C6) #9960

Open virco opened 5 months ago

virco commented 5 months ago

Board

esp32 C6 Dev

Device Description

DevKit C6 N8

Hardware Configuration

N/A

Version

v3.0.1

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

40

PSRAM enabled

yes

Upload speed

115200

Description

C6 module are supported from V3 onwards, where there is an issue with missing "openssl/ssl.h"

Sketch

https://github.com/khoih-prog/HTTPS_Server_Generic/blob/main/examples/ESP32_WiFi/REST-API/REST-API.ino

Debug Message

C:\Users\virco\AppData\Local\Temp\.arduinoIDE-unsaved2024529-27392-1upclbq.1rf7\REST-API\REST-API.ino:57:4: error: #error To be use with ARDUINOJSON_VERSION v5.13.5-
   57 |   #error To be use with ARDUINOJSON_VERSION v5.13.5-
      |    ^~~~~
In file included from C:\Users\virco\AppData\Local\Temp\.arduinoIDE-unsaved2024529-27392-1upclbq.1rf7\REST-API\REST-API.ino:79:
C:\Users\virco\OneDrive\Documents\Arduino\libraries\HTTPS_Server_Generic\src/HTTPS_Server_Generic.h:42:14: fatal error: openssl/ssl.h: No such file or directory
   42 |     #include "openssl/ssl.h"
      |              ^~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: #error To be use with ARDUINOJSON_VERSION v5.13.5-

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

Jason2866 commented 5 months ago

The standard library supported from espressif Arduino for ssl is mbedtls.

virco commented 5 months ago

OK, is there an Arduino HTTPS WEbServer library that utilizes mbedtls? Looks like all available packages at the moment rely on open openssl/ssl.h which was available prior Version 3 framework.

Jason2866 commented 5 months ago

There are examples included in the included lib. https://github.com/espressif/arduino-esp32/tree/master/libraries/WebServer/examples EDIT: Using the IDF version would be a way too. https://github.com/espressif/esp-idf/tree/v5.1.4/components/esp_https_server The Arduino libs are compiled with https_server support. https://github.com/espressif/esp32-arduino-lib-builder/blob/6683a0df74e9bed3f845bc2e2295ef010ce1d9ed/configs/defconfig.common#L15

virco commented 5 months ago

I looked all "https://github.com/espressif/arduino-esp32/tree/master/libraries/WebServer/examples" but didn't find https there, can you point out some examples with TLS 1.2 or TLS 1.3?

Thanks in advance!

al-TideLight commented 4 months ago

I have this same issue with V3 and C6. I have not been able to find any HTTPS examples or working alternatives.