diff --git a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp index 7be46adf0..63d21e45d 100755 --- a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp +++ b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp @@ -418,6 +418,10 @@ size_t WiFiClientSecure_light::_write(const uint8_t *buf, size_t size, bool pmem return sent_bytes; } +void WiFiClientSecure_light::setInsecure() { + _insecure = true; +} + size_t WiFiClientSecure_light::write(const uint8_t *buf, size_t size) { return _write(buf, size, false); } @@ -965,7 +969,7 @@ bool WiFiClientSecure_light::_connectSSL(const char* hostName) { _freeSSL(); clearLastError(); #ifdef ESP8266 - if (!stack_thunk_light_get_stack_bot()) break; + if (!stack_thunk_light_get_stack_bot()) break; #endif // ESP8266 _ctx_present = true; diff --git a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h index 3736749ab..65a3544be 100755 --- a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h +++ b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h @@ -124,6 +124,8 @@ class WiFiClientSecure_light : public WiFiClient { return _max_thunkstack_use; } + void setInsecure(); + private: void _clear(); bool _ctx_present; @@ -152,7 +154,6 @@ class WiFiClientSecure_light : public WiFiClient { unsigned char *_recvapp_buf; size_t _recvapp_len; - bool _clientConnected(); // Is the underlying socket alive? bool _connectSSL(const char *hostName); // Do initial SSL handshake void _freeSSL(); diff --git a/tasmota/sendemail_ESP8266.ino b/tasmota/sendemail_ESP8266.ino index 1b1088776..4abc897fc 100644 --- a/tasmota/sendemail_ESP8266.ino +++ b/tasmota/sendemail_ESP8266.ino @@ -203,6 +203,8 @@ String buffer; } client->setTimeout(timeout); + client->setInsecure(); + // smtp connect #ifdef DEBUG_EMAIL_PORT AddLog(LOG_LEVEL_INFO, PSTR("Connecting: %s on port %d"),host.c_str(),port); @@ -484,4 +486,4 @@ void attach_File(char *path) { #endif // USE_SENDMAIL -#endif // ESP32 +#endif // ESP8266