Skip to content

Commit a5cfece

Browse files
authored
Merge pull request #96 from pennam/ctor-fix
BearSSLClient: fix ctor initialization
2 parents e9f249b + a891ad3 commit a5cfece

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/BearSSLClient.cpp

+2-16
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,9 @@ BearSSLClient::BearSSLClient(Client& client) :
4242
}
4343
#endif
4444

45-
BearSSLClient::BearSSLClient() :
46-
_noSNI(false)
45+
BearSSLClient::BearSSLClient()
46+
: BearSSLClient(nullptr, nullptr, 0)
4747
{
48-
_ecKey.curve = 0;
49-
_ecKey.x = NULL;
50-
_ecKey.xlen = 0;
51-
52-
for (size_t i = 0; i < BEAR_SSL_CLIENT_CHAIN_SIZE; i++) {
53-
_ecCert[i].data = NULL;
54-
_ecCert[i].data_len = 0;
55-
}
56-
_ecCertDynamic = false;
5748
}
5849

5950
BearSSLClient::BearSSLClient(Client& client, const br_x509_trust_anchor* myTAs, int myNumTAs)
@@ -76,13 +67,8 @@ BearSSLClient::BearSSLClient(Client* client, const br_x509_trust_anchor* myTAs,
7667
_br_ssl_client_init_function(NULL)
7768
#endif
7869
{
79-
#ifndef ARDUINO_DISABLE_ECCX08
80-
_ecVrfy = eccX08_vrfy_asn1;
81-
_ecSign = eccX08_sign_asn1;
82-
#else
8370
_ecVrfy = br_ecdsa_vrfy_asn1_get_default();
8471
_ecSign = br_ecdsa_sign_asn1_get_default();
85-
#endif
8672

8773
_ecKey.curve = 0;
8874
_ecKey.x = NULL;

0 commit comments

Comments
 (0)