diff --git a/README.md b/README.md index 7717d2c..8ff586e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_SSLClient.svg) ![PlatformIO](https://badges.registry.platformio.org/packages/mobizt/library/ESP_SSLClient.svg) -The upgradable SSL Client for ESP8266, ESP32, Raspberry Pi Pico (RP2040) and all Arduino devices that supports external networking interfaces e.g., WiFiClient, EthernetClient, and GSMClient. +The upgradable SSL Client for ESP8266, ESP32, Raspberry Pi Pico (RP2040) and other Arduino devices (except for avr) that supports external networking interfaces e.g., WiFiClient, EthernetClient, and GSMClient. This library provided the Secure Layer Networking (SSL/TLS) TCP Client. @@ -25,7 +25,6 @@ This library is fully compatible and able to work with [ESP-Mail-Client](https:/ * ESP8266 * Arduino SAMD * Arduino STM32 - * Arduino AVR * Teensy 3.1 to 4.1 * Arduino Nano RP2040 Connect * Raspberry Pi Pico diff --git a/library.json b/library.json index fb290b2..5d7f5f7 100644 --- a/library.json +++ b/library.json @@ -1,8 +1,8 @@ { "name": "ESP_SSLClient", - "version": "2.0.8", + "version": "2.0.9", "keywords": "communication, REST, esp32, esp8266, arduino", - "description": "This library provided the Secure Layer Networking (SSL/TLS) TCP Client for ESP8266, ESP32 and Raspberry Pi RP2040, Teensy, SAMD, AVR and other Arduino devices that support external networking interfaces e.g., WiFiClient, EthernetClient and GSMClient.", + "description": "This library provided the Secure Layer Networking (SSL/TLS) TCP Client for ESP8266, ESP32 and Raspberry Pi RP2040, Teensy, SAMD, AVR and other Arduino devices (except for avr) that support external networking interfaces e.g., WiFiClient, EthernetClient and GSMClient.", "repository": { "type": "git", "url": "https://github.com/mobizt/ESP_SSLClient.git" @@ -12,5 +12,5 @@ "email": "k_suwatchai@hotmail.com" }], "frameworks": "arduino", - "platforms": "espressif32, espressif8266, atmelsam, atmelavr, atmelmegaavr, ststm32, teensy, rp2040, renesas-ra" + "platforms": "espressif32, espressif8266, atmelsam, ststm32, teensy, rp2040, renesas-ra" } \ No newline at end of file diff --git a/library.properties b/library.properties index 4828ae1..b4762b1 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=ESP_SSLClient -version=2.0.8 +version=2.0.9 author=Mobizt @@ -8,10 +8,10 @@ maintainer=Mobizt sentence=The upgradable SSL Client for Arduino devices. -paragraph=This library provided the Secure Layer Networking (SSL/TLS) TCP Client for ESP8266, ESP32 and Raspberry Pi RP2040, Teensy, SAMD, AVR and other Arduino devices that support external networking interfaces e.g., WiFiClient, EthernetClient and GSMClient. +paragraph=This library provided the Secure Layer Networking (SSL/TLS) TCP Client for ESP8266, ESP32 and Raspberry Pi RP2040, Teensy, SAMD, AVR and other Arduino devices (except for avr) that support external networking interfaces e.g., WiFiClient, EthernetClient and GSMClient. category=Communication url=https://github.com/mobizt/ESP_SSLClient.git -architectures=esp8266, esp32, sam,samd, stm32, STM32F1, STM32F4, teensy, avr, megaavr, mbed_nano, mbed_rp2040, rp2040, mbed_nano, mbed_portenta, mbed_nicla, mbed_opta, mbed_giga, renesas_portenta, renesas_uno +architectures=esp8266, esp32, sam,samd, stm32, STM32F1, STM32F4, teensy, mbed_nano, mbed_rp2040, rp2040, mbed_nano, mbed_portenta, mbed_nicla, mbed_opta, mbed_giga, renesas_portenta, renesas_uno diff --git a/src/ESP_SSLClient.h b/src/ESP_SSLClient.h index 0ececdc..c4713e5 100644 --- a/src/ESP_SSLClient.h +++ b/src/ESP_SSLClient.h @@ -1,8 +1,8 @@ /** * - * The ESP SSL Client Class, ESP_SSLClient.h v2.0.8 + * The ESP SSL Client Class, ESP_SSLClient.h v2.0.9 * - * Created August 8, 2023 + * Created August 9, 2023 * * The MIT License (MIT) * Copyright (c) 2023 K. Suwatchai (Mobizt) @@ -34,11 +34,14 @@ #ifndef SSLCLIENT_CONNECTION_UPGRADABLE #define SSLCLIENT_CONNECTION_UPGRADABLE #endif - +#include "ESP_SSLClient_Const.h" +#if defined(USE_EMBED_SSL_ENGINE) || defined(USE_LIB_SSL_ENGINE) #include "client/BSSL_TCP_Client.h" - class ESP_SSLClient : public BSSL_TCP_Client -{ +#else +class ESP_SSLClient +#endif +{ public: ESP_SSLClient(){}; ~ESP_SSLClient(){}; diff --git a/src/ESP_SSLClient_Const.h b/src/ESP_SSLClient_Const.h index 19711bc..290e702 100644 --- a/src/ESP_SSLClient_Const.h +++ b/src/ESP_SSLClient_Const.h @@ -9,6 +9,12 @@ #include #include +#if defined(__AVR__) +#undef USE_LIB_SSL_ENGINE +#undef USE_EMBED_SSL_ENGINE +#error "Not support AVR architecture" +#endif + #define ESP_SSLCLIENT_VALID_TIMESTAMP 1690979919 #ifndef SSLCLIENT_CONNECTION_UPGRADABLE @@ -24,6 +30,12 @@ #define ESP_SSLCLIENT_DEBUG_PRINT(...) #endif +#if !defined(FPSTR) +#define FPSTR +#endif + +#if defined(USE_EMBED_SSL_ENGINE) || defined(USE_LIB_SSL_ENGINE) + enum esp_ssl_client_debug_level { esp_ssl_debug_none = 0, @@ -121,4 +133,6 @@ static bool send_abort(Client *probe, bool supportsLen) const uint16_t _secure_ports[26] = {443 /* HTTPS */, 465 /* SMTP */, 563 /* NNTP */, 636 /* LDAPS */, 695 /* IEEE-MMS-SSL */, 832 /* NETCONF */, 853 /* DNS */, 989 /* FTPS */, 990 /* FTPS */, 992 /* Telnet */, 993 /* IMAP */, 995 /* POP3 */, 4116 /* Smartcard */, 4843 /* OPC */, 5061 /* SIP */, 5085 /* LLIP */, 5349 /* NAT */, 5671 /* AMQP */, 5986 /* WinRM-HTTPS */, 6513 /* NETCONF */, 6514 /* Syslog */, 6515 /* Elipse RPC */, 6619 /* OFTP */, 8243 /* Apache Synapse */, 8403 /* GxFWD */, 8883 /* MQTT */}; +#endif + #endif \ No newline at end of file diff --git a/src/ESP_SSLClient_FS.h b/src/ESP_SSLClient_FS.h index a7f5509..cda86c5 100644 --- a/src/ESP_SSLClient_FS.h +++ b/src/ESP_SSLClient_FS.h @@ -2,7 +2,7 @@ #define ESP_SSLClient_FS_H #if (defined(ESP8266) || defined(ARDUINO_ARCH_RP2040)) && !defined(ARDUINO_NANO_RP2040_CONNECT) -// for ESP8266 and Raspberry Pi Pico (RP2040) only except for Arduino Nano RP2040 Connect +// for ESP8266 and Raspberry Pi Pico (RP2040) only except for Arduino Nano RP2040 Connect #define USE_EMBED_SSL_ENGINE #else #define USE_LIB_SSL_ENGINE @@ -32,7 +32,7 @@ #if defined __has_include #if __has_include() -#include "Custom_ESP_SSLClient_FS" +#include "Custom_ESP_SSLClient_FS.h" #endif #endif diff --git a/src/client/BSSL_CertStore.cpp b/src/client/BSSL_CertStore.cpp index 14b01b8..d3ff5d6 100644 --- a/src/client/BSSL_CertStore.cpp +++ b/src/client/BSSL_CertStore.cpp @@ -24,6 +24,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_LIB_SSL_ENGINE) #include "BSSL_CertStore.h" diff --git a/src/client/BSSL_CertStore.h b/src/client/BSSL_CertStore.h index 82c74fb..f80d75e 100644 --- a/src/client/BSSL_CertStore.h +++ b/src/client/BSSL_CertStore.h @@ -25,6 +25,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_LIB_SSL_ENGINE) diff --git a/src/client/BSSL_Helper.cpp b/src/client/BSSL_Helper.cpp index 588a58a..b791c5f 100644 --- a/src/client/BSSL_Helper.cpp +++ b/src/client/BSSL_Helper.cpp @@ -28,6 +28,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_LIB_SSL_ENGINE) #include "BSSL_Helper.h" diff --git a/src/client/BSSL_Helper.h b/src/client/BSSL_Helper.h index f4b4276..6be5585 100644 --- a/src/client/BSSL_Helper.h +++ b/src/client/BSSL_Helper.h @@ -29,6 +29,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_EMBED_SSL_ENGINE) @@ -73,6 +74,7 @@ #endif +#if defined(USE_LIB_SSL_ENGINE) || defined(USE_EMBED_SSL_ENGINE) // Cache for a TLS session with a server // Use with BearSSL::WiFiClientSecure::setSession // to accelerate the TLS handshake @@ -441,5 +443,6 @@ namespace bssl } }; +#endif #endif \ No newline at end of file diff --git a/src/client/BSSL_SSL_Client.cpp b/src/client/BSSL_SSL_Client.cpp index 8cb9c6e..909dd3f 100644 --- a/src/client/BSSL_SSL_Client.cpp +++ b/src/client/BSSL_SSL_Client.cpp @@ -1,7 +1,7 @@ /** - * BSSL_SSL_Client library v1.0.5 for Arduino devices. + * BSSL_SSL_Client library v1.0.6 for Arduino devices. * - * Created August 6, 2003 + * Created August 9, 2003 * * This work contains codes based on WiFiClientSecure from Earle F. Philhower and SSLClient from OSU OPEnS Lab. * @@ -40,6 +40,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_LIB_SSL_ENGINE) || defined(USE_EMBED_SSL_ENGINE) #include "BSSL_Helper.h" diff --git a/src/client/BSSL_SSL_Client.h b/src/client/BSSL_SSL_Client.h index 93fb55d..c561391 100644 --- a/src/client/BSSL_SSL_Client.h +++ b/src/client/BSSL_SSL_Client.h @@ -1,7 +1,7 @@ /** - * BSSL_SSL_Client library v1.0.5 for Arduino devices. + * BSSL_SSL_Client library v1.0.6 for Arduino devices. * - * Created August 6, 2003 + * Created August 9, 2003 * * This work contains codes based on WiFiClientSecure from Earle F. Philhower and SSLClient from OSU OPEnS Lab. * @@ -38,9 +38,8 @@ #include #include "../ESP_SSLClient_FS.h" -#if defined(USE_LIB_SSL_ENGINE) || defined(USE_EMBED_SSL_ENGINE) - #include "../ESP_SSLClient_Const.h" +#if defined(USE_LIB_SSL_ENGINE) || defined(USE_EMBED_SSL_ENGINE) #include #include @@ -50,10 +49,6 @@ #endif #endif - -#if !defined(FPSTR) -#define FPSTR -#endif #if defined(USE_LIB_SSL_ENGINE) #include "BSSL_Helper.h" diff --git a/src/client/BSSL_TCP_Client.cpp b/src/client/BSSL_TCP_Client.cpp index 8c87046..48d75d4 100644 --- a/src/client/BSSL_TCP_Client.cpp +++ b/src/client/BSSL_TCP_Client.cpp @@ -1,7 +1,7 @@ /** - * BSSL_TCP_Client v2.0.6 for Arduino devices. + * BSSL_TCP_Client v2.0.7 for Arduino devices. * - * Created August 8, 2023 + * Created August 9, 2023 * * The MIT License (MIT) * Copyright (c) 2023 K. Suwatchai (Mobizt) @@ -51,6 +51,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_LIB_SSL_ENGINE) || defined(USE_EMBED_SSL_ENGINE) #include "BSSL_TCP_Client.h" diff --git a/src/client/BSSL_TCP_Client.h b/src/client/BSSL_TCP_Client.h index d70d2bb..f29db4d 100644 --- a/src/client/BSSL_TCP_Client.h +++ b/src/client/BSSL_TCP_Client.h @@ -1,7 +1,7 @@ /** - * BSSL_TCP_Client v2.0.6 for Arduino devices. + * BSSL_TCP_Client v2.0.7 for Arduino devices. * - * Created August 8, 2023 + * Created August 9, 2023 * * The MIT License (MIT) * Copyright (c) 2023 K. Suwatchai (Mobizt) @@ -52,6 +52,7 @@ #include #include "../ESP_SSLClient_FS.h" +#include "../ESP_SSLClient_Const.h" #if defined(USE_LIB_SSL_ENGINE) || defined(USE_EMBED_SSL_ENGINE) #include "BSSL_SSL_Client.h"