From 9731b3ea539984d7199a3c63a6ceaa043433beea Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 3 Sep 2021 08:53:42 +0200 Subject: [PATCH] Moved HttpClient to its own lib --- lib/libesp32/Berry-HttpClientLight/library.json | 17 +++++++++++++++++ .../src/HttpClientLight.cpp | 3 +++ .../src/HttpClientLight.h | 0 tasmota/xdrv_52_3_berry_webclient.ino | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lib/libesp32/Berry-HttpClientLight/library.json rename lib/{lib_ssl/tls_mini => libesp32/Berry-HttpClientLight}/src/HttpClientLight.cpp (99%) rename lib/{lib_ssl/tls_mini => libesp32/Berry-HttpClientLight}/src/HttpClientLight.h (100%) diff --git a/lib/libesp32/Berry-HttpClientLight/library.json b/lib/libesp32/Berry-HttpClientLight/library.json new file mode 100644 index 000000000..1e1479bbb --- /dev/null +++ b/lib/libesp32/Berry-HttpClientLight/library.json @@ -0,0 +1,17 @@ +{ + "name": "HttpClient light for Berry", + "version": "1.0", + "description": "Forked version of Arduino HttpClient to support BearSSL instead of mbedTLS", + "license": "MIT", + "homepage": "https://github.com/arendst/Tasmota", + "frameworks": "*", + "platforms": "*", + "authors": + { + "name": "Stephan Hadinger", + "maintainer": true + }, + "build": { + "flags": [ "-I$PROJECT_DIR/include" ] + } +} \ No newline at end of file diff --git a/lib/lib_ssl/tls_mini/src/HttpClientLight.cpp b/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.cpp similarity index 99% rename from lib/lib_ssl/tls_mini/src/HttpClientLight.cpp rename to lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.cpp index 02ea6c8c4..420cbfb71 100644 --- a/lib/lib_ssl/tls_mini/src/HttpClientLight.cpp +++ b/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.cpp @@ -40,7 +40,10 @@ #include #include "HttpClientLight.h" + +#ifdef USE_WEBCLIENT_HTTPS #include "WiFiClientSecureLightBearSSL.h" +#endif // USE_WEBCLIENT_HTTPS // #ifdef HTTPCLIENT_1_1_COMPATIBLE class TransportTraits diff --git a/lib/lib_ssl/tls_mini/src/HttpClientLight.h b/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.h similarity index 100% rename from lib/lib_ssl/tls_mini/src/HttpClientLight.h rename to lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.h diff --git a/tasmota/xdrv_52_3_berry_webclient.ino b/tasmota/xdrv_52_3_berry_webclient.ino index 513d2d56d..5c98043a2 100644 --- a/tasmota/xdrv_52_3_berry_webclient.ino +++ b/tasmota/xdrv_52_3_berry_webclient.ino @@ -23,7 +23,7 @@ #ifdef USE_WEBCLIENT #include -#include +#include "HttpClientLight.h" String wc_UrlEncode(const String& text) { const char hex[] = "0123456789ABCDEF";