File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ class ZephyrClient : public arduino::Client, ZephyrSocketWrapper {
3131 return ret;
3232 }
3333#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)
34- int connectSSL (const char * host, uint16_t port, char * cert) {
35- auto ret = ZephyrSocketWrapper::connectSSL ((char *)host, port, cert);
34+ int connectSSL (const char * host, uint16_t port, const char * cert) {
35+ auto ret = ZephyrSocketWrapper::connectSSL ((char *)host, port, ( char *) cert);
3636 if (ret) {
3737 _connected = true ;
3838 }
Original file line number Diff line number Diff line change 88
99#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)
1010class ZephyrSSLClient : public ZephyrClient {
11+ private:
12+ const char * _cert = nullptr ;
1113
1214public:
1315 int connect (const char * host, uint16_t port) override {
14- return connectSSL (host, port, nullptr );
16+ return connectSSL (host, port, _cert );
1517 }
16- int connect (const char * host, uint16_t port, char * cert) {
18+ int connect (const char * host, uint16_t port, const char * cert) {
1719 return connectSSL (host, port, cert);
1820 }
21+ void setCACert (const char * cert) {
22+ _cert = cert;
23+ }
1924};
2025#endif
You can’t perform that action at this time.
0 commit comments