File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 31
31
#include " BearSSLClient.h"
32
32
33
33
BearSSLClient::BearSSLClient (Client& client) :
34
- _client(&client)
34
+ BearSSLClient(client, TAs, TAs_NUM)
35
+ {
36
+ }
37
+
38
+ BearSSLClient::BearSSLClient (Client& client, const br_x509_trust_anchor* myTAs, int myNumTAs) :
39
+ _client(&client),
40
+ _TAs(myTAs),
41
+ _numTAs(myNumTAs)
35
42
{
36
43
_ecKey.curve = 0 ;
37
44
_ecKey.x = NULL ;
@@ -234,7 +241,7 @@ void BearSSLClient::setEccSlot(int ecc508KeySlot, const char cert[])
234
241
int BearSSLClient::connectSSL (const char * host)
235
242
{
236
243
// initialize client context with all algorithms and hardcoded trust anchors
237
- br_ssl_client_init_full (&_sc, &_xc, TAs, TAs_NUM );
244
+ br_ssl_client_init_full (&_sc, &_xc, _TAs, _numTAs );
238
245
239
246
// set the buffer in split mode
240
247
br_ssl_engine_set_buffer (&_sc.eng , _iobuf, sizeof (_iobuf), 1 );
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class BearSSLClient : public Client {
38
38
39
39
public:
40
40
BearSSLClient (Client& client);
41
+ BearSSLClient (Client& client, const br_x509_trust_anchor* myTAs, int myNumTAs);
41
42
virtual ~BearSSLClient ();
42
43
43
44
virtual int connect (IPAddress ip, uint16_t port);
@@ -65,7 +66,10 @@ class BearSSLClient : public Client {
65
66
static void clientAppendCert (void *ctx, const void *data, size_t len);
66
67
67
68
private:
68
- Client* _client;
69
+ Client* _client;
70
+ const br_x509_trust_anchor* _TAs;
71
+ int _numTAs;
72
+
69
73
br_ec_private_key _ecKey;
70
74
br_x509_certificate _ecCert;
71
75
bool _ecCertDynamic;
You can’t perform that action at this time.
0 commit comments