Skip to content

Commit 6f614c0

Browse files
committed
Add support Arduino UNO R4 WiFi.
1 parent e8b7b3e commit 6f614c0

File tree

7 files changed

+32
-12
lines changed

7 files changed

+32
-12
lines changed

.github/workflows/compile_library.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- "bluepill_f103c8_128k"
2929
- "mkr1000USB"
3030
- "teensy41"
31+
- "renesas-ra"
3132
steps:
3233
- uses: actions/checkout@v2
3334
- name: Cache pip

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESP_SSLClient",
3-
"version": "2.0.7",
3+
"version": "2.0.8",
44
"keywords": "communication, REST, esp32, esp8266, arduino",
55
"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.",
66
"repository": {
@@ -12,5 +12,5 @@
1212
"email": "[email protected]"
1313
}],
1414
"frameworks": "arduino",
15-
"platforms": "espressif32, espressif8266, atmelsam, rp2040, atmelavr, atmelmegaavr, ststm32, teensy"
15+
"platforms": "espressif32, espressif8266, atmelsam, atmelavr, atmelmegaavr, ststm32, teensy, rp2040, renesas-ra"
1616
}

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=ESP_SSLClient
22

3-
version=2.0.7
3+
version=2.0.8
44

55
author=Mobizt
66

@@ -14,4 +14,4 @@ category=Communication
1414

1515
url=https://github.com/mobizt/ESP_SSLClient.git
1616

17-
architectures=esp8266,esp32,sam,samd,stm32,STM32F1,STM32F4,teensy,avr,megaavr,mbed_nano,mbed_rp2040,rp2040
17+
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

src/ESP_SSLClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
*
3-
* The ESP SSL Client Class, ESP_SSLClient.h v2.0.7
3+
* The ESP SSL Client Class, ESP_SSLClient.h v2.0.8
44
*
5-
* Created August 6, 2023
5+
* Created August 8, 2023
66
*
77
* The MIT License (MIT)
88
* Copyright (c) 2023 K. Suwatchai (Mobizt)

src/client/BSSL_Helper.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <stdlib.h>
3838
#include <string.h>
3939
#if defined __has_include
40-
#if __has_include(<pgmspace.h>)
40+
#if __has_include(<pgmspace.h>)
4141
#include <pgmspace.h>
4242
#endif
4343
#endif
@@ -112,6 +112,7 @@ namespace key_bssl
112112
bool looks_like_DER(const unsigned char *buf, size_t len);
113113
pem_object *decode_pem(const void *src, size_t len, size_t *num);
114114
void free_pem_object_contents(pem_object *po);
115+
char *strdupImpl(const char *s);
115116

116117
// Used as callback multiple places to append a string to a vector
117118
static void byte_vector_append(void *ctx, const void *buff, size_t len)
@@ -283,6 +284,16 @@ namespace key_bssl
283284
}
284285
}
285286

287+
char *strdupImpl(const char *s)
288+
{
289+
size_t slen = strlen(s);
290+
char *result = (char *)malloc(slen + 1);
291+
if (!result)
292+
return NULL;
293+
memcpy(result, s, slen + 1);
294+
return result;
295+
}
296+
286297
// Converts a PEM (~=base64) source into a set of DER-encoded binary blobs.
287298
// Each blob is named by the ---- BEGIN xxx ---- field, and multiple
288299
// blobs may be returned.
@@ -317,7 +328,7 @@ namespace key_bssl
317328
switch (br_pem_decoder_event(pc.get()))
318329
{
319330
case BR_PEM_BEGIN_OBJ:
320-
po.name = strdup(br_pem_decoder_name(pc.get()));
331+
po.name = strdupImpl(br_pem_decoder_name(pc.get()));
321332
br_pem_decoder_setdest(pc.get(), byte_vector_append, &bv);
322333
inobj = true;
323334
break;

src/client/BSSL_TCP_Client.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* BSSL_TCP_Client v2.0.5 for Arduino devices.
2+
* BSSL_TCP_Client v2.0.6 for Arduino devices.
33
*
4-
* Created August 6, 2023
4+
* Created August 8, 2023
55
*
66
* The MIT License (MIT)
77
* Copyright (c) 2023 K. Suwatchai (Mobizt)
@@ -277,6 +277,8 @@ int BSSL_TCP_Client::setTimeout(uint32_t seconds)
277277
return 1;
278278
}
279279

280+
int BSSL_TCP_Client::getTimeout() { return _ssl_client.getTimeout() / 1000; }
281+
280282
void BSSL_TCP_Client::setHandshakeTimeout(unsigned long handshake_timeout)
281283
{
282284
_handshake_timeout = handshake_timeout * 1000;

src/client/BSSL_TCP_Client.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* BSSL_TCP_Client v2.0.5 for Arduino devices.
2+
* BSSL_TCP_Client v2.0.6 for Arduino devices.
33
*
4-
* Created August 6, 2023
4+
* Created August 8, 2023
55
*
66
* The MIT License (MIT)
77
* Copyright (c) 2023 K. Suwatchai (Mobizt)
@@ -285,6 +285,12 @@ class BSSL_TCP_Client : public Client
285285
*/
286286
int setTimeout(uint32_t seconds);
287287

288+
/**
289+
* Get the TCP timeout in seconds.
290+
* @return The TCP timeout in seconds.
291+
*/
292+
int getTimeout();
293+
288294
/**
289295
* Set the SSL handshake timeout in seconds.
290296
* @param handshake_timeout The SSL handshake timeout in seconds.

0 commit comments

Comments
 (0)