Skip to content

Commit 6952258

Browse files
committed
src/BearSSLClient.cpp: fix _ecSign
The client can specify its own _ecSign function since commit 996778e as well as its own certificate since commit 874c6b0 The goal was to allow the user to use ArduinoBearSSL without the ECCX08 (for example with an (e)SIM applet compliant to the new GSMA IoT SAFE standard). However, these two functions don't work because br_ssl_client_set_single_ec is not called if _ecKey.xlen is set to 0 so fix this latest issue Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent d96ce6b commit 6952258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/BearSSLClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ int BearSSLClient::connectSSL(const char* host)
301301
br_x509_minimal_set_ecdsa(&_xc, br_ssl_engine_get_ec(&_sc.eng), br_ssl_engine_get_ecdsa(&_sc.eng));
302302

303303
// enable client auth
304-
if (_ecCert.data_len && _ecKey.xlen) {
304+
if (_ecCert.data_len) {
305305
br_ssl_client_set_single_ec(&_sc, &_ecCert, 1, &_ecKey, BR_KEYTYPE_KEYX | BR_KEYTYPE_SIGN, BR_KEYTYPE_EC, br_ec_get_default(), _ecSign);
306306
}
307307

0 commit comments

Comments
 (0)