Skip to content

Commit 95a90d8

Browse files
committed
wifi ssl: clear certificate buffer if creating a new client
- There is the possibility that _SSLCLIENTCLOSE is not called from the sketch
1 parent d166c14 commit 95a90d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

UNOR4USBBridge/cmds_wifi_SSL.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ void CAtHandler::add_cmds_wifi_SSL() {
2828
for (int i = 0; i < MAX_CLIENT_AVAILABLE; i++) {
2929
if (sslclients[i] == nullptr) {
3030
sslclients[i] = new WiFiClientSecure();
31+
clients_ca[i].clear();
32+
clients_cert_pem[i].clear();
33+
clients_key_pem[i].clear();
3134
if(sslclients[i] == nullptr) {
3235
return chAT::CommandStatus::ERROR;
3336
}

0 commit comments

Comments
 (0)