|
20 | 20 | ******************************************************************************/
|
21 | 21 |
|
22 | 22 | #include "Arduino_WiFiConnectionHandler.h"
|
23 |
| - |
24 | 23 | #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
|
| 24 | +#if defined(BOARD_STM32H7) |
| 25 | + #include <WiFiSSLClient.h> |
| 26 | +#elif defined(ARDUINO_ARCH_ESP32) |
| 27 | + #include <WiFiClientSecure.h> |
| 28 | +#elif defined(ARDUINO_UNOR4_WIFI) |
| 29 | + #include <WiFiSSLClient.h> |
| 30 | +#elif defined(ARDUINO_PORTENTA_C33) |
| 31 | + #include <WiFiSSLClient.h> |
| 32 | +#elif defined(BOARD_HAS_SE050) |
| 33 | + #include <WiFiSSLSE050Client.h> |
| 34 | +#endif |
| 35 | + |
| 36 | +#ifdef BOARD_HAS_OFFLOADED_ECCX08 |
| 37 | +#include <Arduino_SecureElement.h> |
| 38 | +#include <WiFiSSLClient.h> |
| 39 | +#endif |
25 | 40 |
|
26 | 41 | /******************************************************************************
|
27 | 42 | CONSTANTS
|
@@ -170,4 +185,14 @@ NetworkConnectionState WiFiConnectionHandler::update_handleDisconnected()
|
170 | 185 | }
|
171 | 186 | }
|
172 | 187 |
|
| 188 | +Client* WiFiConnectionHandler::getNewSSLClient() { |
| 189 | +#ifdef ARDUINO_ARCH_ESP32 |
| 190 | + return new WiFiClientSecure(); |
| 191 | +#elif defined(ARDUINO_ARCH_ESP8266) |
| 192 | + return new WiFiClientSecure(); |
| 193 | +#else |
| 194 | + return new WiFiSSLClient(); |
| 195 | +#endif |
| 196 | +} |
| 197 | + |
173 | 198 | #endif /* #ifdef BOARD_HAS_WIFI */
|
0 commit comments