From fa0c4ee5e2ceb44a378e4bbfd970daaad6292390 Mon Sep 17 00:00:00 2001 From: Noah Laptop Date: Sun, 24 May 2020 14:00:35 -0700 Subject: [PATCH] add support for SAM, switch __throw_length_error to weak linkage --- library.properties | 2 +- src/SSLClientParameters.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library.properties b/library.properties index 6add1cf..1ddd79c 100644 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=Arduino library to add TLS functionality to any Client class paragraph=including the Arduino EthernetClient and WiFiClient classes (though it is better to prefer WiFClient.connectSSL if implemented). In other words, SSLClient implements encrypted communication through SSL on devices that do not otherwise support it. category=Communication url=https://github.com/OPEnSLab-OSU/SSLClient -architectures=samd,tivac,stm32,esp32 +architectures=samd,sam,tivac,stm32,esp32 includes=SSLClient.h diff --git a/src/SSLClientParameters.cpp b/src/SSLClientParameters.cpp index a32a98a..1c345fc 100644 --- a/src/SSLClientParameters.cpp +++ b/src/SSLClientParameters.cpp @@ -1,11 +1,11 @@ #include "SSLClientParameters.h" // fix for non-exception arduino platforms (Feather and Teensy 4.0) -extern "C"{ - int __attribute__((weak)) __exidx_start(){ return -1;} - int __attribute__((weak)) __exidx_end(){ return -1; } +namespace std { + void __attribute__((weak)) __throw_length_error(char const*) {} } + struct ssl_pem_decode_state { std::vector* vect; size_t index = 0;