Moving to TLS from OpenSSL in Arduino environment? #154
Unanswered
SteveWeingart
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Did someone manage to partition for new versions or is there a fork? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've been building a webserver for a device using the compat version of the esp32_https_server and I'm getting the following warnings:
In file included from C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src\ConnectionContext.hpp:9,
from C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src\WebsocketHandler.hpp:14,
from C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src\WebsocketNode.hpp:7,
from C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src\WebsocketNode.cpp:1:
C:\Users\steve\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.2/tools/sdk/esp32/include/openssl/include/openssl/ssl.h:8:2: warning: #warning "OpenSSL component will be removed from ESP-IDF in v5.0, please use esp_tls instead" [-Wcpp]
#warning "OpenSSL component will be removed from ESP-IDF in v5.0, please use esp_tls instead"
So I did some hunting and changed the appropriate files (HTTPConnection.hpp, ConnectionContext.hpp, HTTPSServer.hpp, HTTPResponse.hpp), from #include "openssl/ssl.h" to #include "mbedtls/md.h" That almost works. I get the following errors:
In file included from C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src/HTTPSServer.hpp:24,
from C:\Users\steve\Documents\Arduino\libraries\esp32_https_server_compat\src\ESPWebServerSecure.hpp:5,
from C:\Users\steve\Documents\Arduino\libraries\esp32_https_server_compat\src\ESPWebServerSecure.cpp:1:
C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src/HTTPSConnection.hpp:39:46: error: 'SSL_CTX' has not been declared
virtual int initialize(int serverSocketID, SSL_CTX * sslCtx, HTTPHeaders *defaultHeaders);
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src/HTTPSConnection.hpp:54:3: error: 'SSL' does not name a type; did you mean 'SS'?
SSL * _ssl;
^~~
SS
In file included from C:\Users\steve\Documents\Arduino\libraries\esp32_https_server_compat\src\ESPWebServerSecure.hpp:5,
from C:\Users\steve\Documents\Arduino\libraries\esp32_https_server_compat\src\ESPWebServerSecure.cpp:1:
C:\Users\steve\Documents\Arduino\libraries\ESP32_HTTPS_Server\src/HTTPSServer.hpp:43:3: error: 'SSL_CTX' does not name a type; did you mean 'SHA_CTX'?
SSL_CTX * _sslctx;
^~~~~~~
SHA_CTX
I also got a warning about #include <hwcrypto/sha.h> being deprecated, but swapping to #include < sha_parallel_engine.h> worked fine.
Any ideas?
Thanks!
Steve
Beta Was this translation helpful? Give feedback.
All reactions