File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
libraries/SocketWrapper/src Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11#include " MbedSSLClient.h"
22
33arduino::MbedSSLClient::MbedSSLClient ()
4- : _ca_cert_custom (nullptr ),
4+ : _rootCA (nullptr ),
55 _hostname(nullptr ),
66 _clientCert(nullptr ),
77 _privateKey(nullptr ),
Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ class MbedSSLClient : public arduino::MbedClient {
4848 _disableSNI = statusSNI;
4949 }
5050
51- void appendCustomCACert (const char * ca_cert ) {
52- _ca_cert_custom = ca_cert ;
51+ void appendCustomCACert (const char * rootCA ) {
52+ _rootCA = rootCA ;
5353 _appendCA = true ;
5454 }
5555 void setCACert (const char * rootCA) {
56- _ca_cert_custom = rootCA;
56+ _rootCA = rootCA;
5757 _appendCA = false ;
5858 }
5959 void setCertificate (const char * clientCert) {
@@ -64,7 +64,7 @@ class MbedSSLClient : public arduino::MbedClient {
6464 }
6565
6666protected:
67- const char * _ca_cert_custom ;
67+ const char * _rootCA ;
6868 const char * _hostname;
6969 const char * _clientCert;
7070 const char * _privateKey;
@@ -86,8 +86,8 @@ class MbedSSLClient : public arduino::MbedClient {
8686 }
8787 }
8888
89- if (!_appendCA && _ca_cert_custom ) {
90- return ((TLSSocket*)sock)->set_root_ca_cert (_ca_cert_custom );
89+ if (!_appendCA && _rootCA ) {
90+ return ((TLSSocket*)sock)->set_root_ca_cert (_rootCA );
9191 }
9292
9393#if defined(MBEDTLS_FS_IO)
@@ -111,8 +111,8 @@ class MbedSSLClient : public arduino::MbedClient {
111111 }
112112#endif
113113
114- if (_ca_cert_custom != NULL ) {
115- err = ((TLSSocket*)sock)->append_root_ca_cert (_ca_cert_custom );
114+ if (_rootCA != NULL ) {
115+ err = ((TLSSocket*)sock)->append_root_ca_cert (_rootCA );
116116 }
117117 return err;
118118 }
You can’t perform that action at this time.
0 commit comments