Skip to content

Commit 2fa6afe

Browse files
committed
Allow the user to set his own client certificate
This will allow the user to use ArduinoBearSSL without the ECCX08 (for example with an (e)SIM applet compliant to the new GSMA IoT SAFE standard) Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent 996778e commit 2fa6afe

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/BearSSLClient.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ void BearSSLClient::setEccSign(br_ecdsa_sign sign)
205205
_ecSign = sign;
206206
}
207207

208+
void BearSSLClient::setEccCert(br_x509_certificate cert)
209+
{
210+
_ecCert = cert;
211+
}
212+
208213
void BearSSLClient::setEccSlot(int ecc508KeySlot, const byte cert[], int certLength)
209214
{
210215
// HACK: put the key slot info. in the br_ec_private_key structure

src/BearSSLClient.h

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ class BearSSLClient : public Client {
7474
void setEccVrfy(br_ecdsa_vrfy vrfy);
7575
void setEccSign(br_ecdsa_sign sign);
7676

77+
void setEccCert(br_x509_certificate cert);
78+
7779
void setEccSlot(int ecc508KeySlot, const byte cert[], int certLength);
7880
void setEccSlot(int ecc508KeySlot, const char cert[]);
7981

0 commit comments

Comments
 (0)