File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,6 @@ SSLClient::SSLClient()
40
40
_private_key = NULL ;
41
41
_pskIdent = NULL ;
42
42
_psKey = NULL ;
43
-
44
- ssl_init (sslclient, nullptr , _CA_path);
45
-
46
- sslclient->handshake_timeout = 5000 ;
47
43
}
48
44
49
45
SSLClient::SSLClient (Client* client)
@@ -92,6 +88,13 @@ SSLClient::~SSLClient()
92
88
delete sslclient;
93
89
}
94
90
91
+ void SSLClient::setClient (Client& client)
92
+ {
93
+ ssl_init (sslclient, &client, _CA_path);
94
+
95
+ sslclient->handshake_timeout = 5000 ;
96
+ }
97
+
95
98
void SSLClient::stop ()
96
99
{
97
100
if (sslclient->client >= 0 ) {
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ class SSLClient : public Client
48
48
SSLClient (Client* client, String ca_path);
49
49
~SSLClient ();
50
50
51
+ void setClient (Client& client);
52
+
51
53
int connect (IPAddress ip, uint16_t port);
52
54
int connect (IPAddress ip, uint16_t port, int32_t timeout);
53
55
int connect (const char *host, uint16_t port);
You can’t perform that action at this time.
0 commit comments