From 630457b30a62b65e4ab2fd40030f05c1e90e24ce Mon Sep 17 00:00:00 2001 From: Dan Egnor Date: Sun, 16 Jun 2024 20:16:09 -0700 Subject: [PATCH 1/3] add library.properties --- library.properties | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 library.properties diff --git a/library.properties b/library.properties new file mode 100644 index 000000000..2157c94e2 --- /dev/null +++ b/library.properties @@ -0,0 +1,10 @@ +name=ESPAsyncWebServer +version=3.1.0 +author=esphome +maintainer=esphome +sentence=Async Web Server for ESP8266 and ESP32 +paragraph=A fork of the ESPAsyncWebServer library maintained by ESPHome +category=Communication +url=https://github.com/esphome/ESPAsyncWebServer +architectures=esp8266, esp32 +depends=AsyncTCP, ESPAsyncTCP From 92901eaff39953df383d68aaa338990f98a9727b Mon Sep 17 00:00:00 2001 From: Dan Egnor Date: Sun, 16 Jun 2024 20:16:22 -0700 Subject: [PATCH 2/3] for esp32-arduino 3.x, support mbedtls 3.x --- src/WebAuthentication.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/WebAuthentication.cpp b/src/WebAuthentication.cpp index 45246a196..be721c245 100644 --- a/src/WebAuthentication.cpp +++ b/src/WebAuthentication.cpp @@ -27,6 +27,15 @@ #endif +#if MBEDTLS_MAJOR_VERSION < 3 +// Compatibility with older versions of mbedTLS +// https://github.com/Mbed-TLS/mbedtls/blob/development/docs/3.0-migration-guide.md +#define mbedtls_md5_starts_ret mbedtls_md5_starts +#define mbedtls_md5_update_ret mbedtls_md5_update +#define mbedtls_md5_finish_ret mbedtls_md5_finish +#endif + + // Basic Auth hash = base64("username:password") bool checkBasicAuthentication(const char * hash, const char * username, const char * password){ From 19e8a785480aa7c166f2df54ef54dc39df81e4e7 Mon Sep 17 00:00:00 2001 From: Dan Egnor Date: Sun, 16 Jun 2024 20:19:11 -0700 Subject: [PATCH 3/3] apparently ets_printf does not exist any more? --- src/AsyncEventSource.cpp | 2 +- src/AsyncWebSocket.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AsyncEventSource.cpp b/src/AsyncEventSource.cpp index 5473f0857..958b36ea3 100644 --- a/src/AsyncEventSource.cpp +++ b/src/AsyncEventSource.cpp @@ -186,7 +186,7 @@ void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage *dataMessage) return; } if(_messageQueue.length() >= SSE_MAX_QUEUED_MESSAGES){ - ets_printf("ERROR: Too many messages queued\n"); + ESP_LOGE("ESPAsyncWebServer", "AsyncEventSource: Too many messages queued"); delete dataMessage; } else { _messageQueue.add(dataMessage); diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index 6e88da94f..d081dc32f 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -546,7 +546,7 @@ void AsyncWebSocketClient::_queueMessage(AsyncWebSocketMessage *dataMessage){ return; } if(_messageQueue.length() >= WS_MAX_QUEUED_MESSAGES){ - ets_printf("ERROR: Too many messages queued\n"); + ESP_LOGE("ESPAsyncWebServer", "AsyncWebSocket: Too many messages queued"); delete dataMessage; } else { _messageQueue.add(dataMessage);