Skip to content

Commit

Permalink
MbedSSLClient: rename snake_case variable to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Nov 8, 2024
1 parent a1bea8b commit 9031045
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libraries/SocketWrapper/src/MbedSSLClient.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "MbedSSLClient.h"

arduino::MbedSSLClient::MbedSSLClient()
: _ca_cert_custom(nullptr),
: _rootCA(nullptr),
_hostname(nullptr),
_clientCert(nullptr),
_privateKey(nullptr),
Expand Down
16 changes: 8 additions & 8 deletions libraries/SocketWrapper/src/MbedSSLClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class MbedSSLClient : public arduino::MbedClient {
_disableSNI = statusSNI;
}

void appendCustomCACert(const char* ca_cert) {
_ca_cert_custom = ca_cert;
void appendCustomCACert(const char* rootCA) {
_rootCA = rootCA;
_appendCA = true;
}
void setCACert(const char* rootCA) {
_ca_cert_custom = rootCA;
_rootCA = rootCA;
_appendCA = false;
}
void setCertificate(const char* clientCert) {
Expand All @@ -64,7 +64,7 @@ class MbedSSLClient : public arduino::MbedClient {
}

protected:
const char* _ca_cert_custom;
const char* _rootCA;
const char* _hostname;
const char* _clientCert;
const char* _privateKey;
Expand All @@ -86,8 +86,8 @@ class MbedSSLClient : public arduino::MbedClient {
}
}

if(!_appendCA && _ca_cert_custom) {
return ((TLSSocket*)sock)->set_root_ca_cert(_ca_cert_custom);
if(!_appendCA && _rootCA) {
return ((TLSSocket*)sock)->set_root_ca_cert(_rootCA);
}

#if defined(MBEDTLS_FS_IO)
Expand All @@ -111,8 +111,8 @@ class MbedSSLClient : public arduino::MbedClient {
}
#endif

if(_ca_cert_custom != NULL) {
err = ((TLSSocket*)sock)->append_root_ca_cert(_ca_cert_custom);
if(_rootCA != NULL) {
err = ((TLSSocket*)sock)->append_root_ca_cert(_rootCA);
}
return err;
}
Expand Down

0 comments on commit 9031045

Please sign in to comment.