From 7c0a274518fbf4d1b9792b1d96541d5e2a0dd938 Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Tue, 20 Jul 2021 14:41:13 +0300 Subject: [PATCH] Notifications: do setInsecure on ESP32 too Fixes #653 --- esp3d/src/modules/notifications/notifications_service.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esp3d/src/modules/notifications/notifications_service.cpp b/esp3d/src/modules/notifications/notifications_service.cpp index 49a2335a..b4f27c76 100644 --- a/esp3d/src/modules/notifications/notifications_service.cpp +++ b/esp3d/src/modules/notifications/notifications_service.cpp @@ -195,8 +195,8 @@ bool NotificationsService::sendPushoverMSG(const char * title, const char * mess #pragma GCC diagnostic ignored "-Wdeprecated-declarations" TSecureClient Notificationclient; #pragma GCC diagnostic pop -#if defined(ARDUINO_ARCH_ESP8266) Notificationclient.setInsecure(); +#if defined(ARDUINO_ARCH_ESP8266) if (Notificationclient.probeMaxFragmentLength(_serveraddress.c_str(), _port, BEARSSL_MFLN_SIZE)) { log_esp3d("Handshake success"); Notificationclient.setBufferSizes(BEARSSL_MFLN_SIZE, 512); @@ -243,8 +243,8 @@ bool NotificationsService::sendTelegramMSG(const char * title, const char * mess #pragma GCC diagnostic ignored "-Wdeprecated-declarations" TSecureClient Notificationclient; #pragma GCC diagnostic pop -#if defined(ARDUINO_ARCH_ESP8266) Notificationclient.setInsecure(); +#if defined(ARDUINO_ARCH_ESP8266) if (Notificationclient.probeMaxFragmentLength(_serveraddress.c_str(), _port, BEARSSL_MFLN_SIZE)) { log_esp3d("Handshake success"); Notificationclient.setBufferSizes(BEARSSL_MFLN_SIZE, 512); @@ -285,8 +285,8 @@ bool NotificationsService::sendEmailMSG(const char * title, const char * message #pragma GCC diagnostic ignored "-Wdeprecated-declarations" TSecureClient Notificationclient; #pragma GCC diagnostic pop -#if defined(ARDUINO_ARCH_ESP8266) Notificationclient.setInsecure(); +#if defined(ARDUINO_ARCH_ESP8266) if (Notificationclient.probeMaxFragmentLength(_serveraddress.c_str(), _port, BEARSSL_MFLN_SIZE)) { log_esp3d("Handshake success"); Notificationclient.setBufferSizes(BEARSSL_MFLN_SIZE, 512); @@ -388,8 +388,8 @@ bool NotificationsService::sendLineMSG(const char * title, const char * message) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" TSecureClient Notificationclient; #pragma GCC diagnostic pop -#if defined(ARDUINO_ARCH_ESP8266) Notificationclient.setInsecure(); +#if defined(ARDUINO_ARCH_ESP8266) if (Notificationclient.probeMaxFragmentLength(_serveraddress.c_str(), _port, BEARSSL_MFLN_SIZE)) { log_esp3d("Handshake success"); Notificationclient.setBufferSizes(BEARSSL_MFLN_SIZE, 512);