Skip to content

Commit d771bd7

Browse files
authored
Merge pull request #316 from arduino-libraries/aentinger-patch-1
Remove ArduinoBearSSL as a CI build dependency.
2 parents b7eba3f + 0b77894 commit d771bd7

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/compile-examples.yml

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ jobs:
8888
- name: RTCZero
8989
- name: WiFiNINA
9090
- name: Arduino_JSON
91-
- name: ArduinoBearSSL
9291
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
9392
sketch-paths: |
9493
- examples/utility/Provisioning

examples/utility/SelfProvisioning/ECCX08Cert.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
* INCLUDE
2020
******************************************************************************/
2121

22-
#include <ArduinoBearSSL.h>
23-
24-
#include "bearssl/bearssl_hash.h"
22+
#include <ArduinoIoTCloud.h>
2523
#include <ArduinoECCX08.h>
26-
2724
#include "ECCX08Cert.h"
25+
#include "tls/utility/SHA256.h"
2826

2927
/******************************************************************************
3028
* DEFINE
@@ -190,13 +188,13 @@ String ECCX08CertClass::endCSR() {
190188
*out++ = 0xa0;
191189
*out++ = 0x00;
192190

193-
br_sha256_context sha256Context;
191+
SHA256 sha256;
194192
byte csrInfoSha256[64];
195193
byte signature[64];
196194

197-
br_sha256_init(&sha256Context);
198-
br_sha256_update(&sha256Context, csrInfo, csrInfoHeaderLen + csrInfoLen);
199-
br_sha256_out(&sha256Context, csrInfoSha256);
195+
sha256.begin();
196+
sha256.update(csrInfo, csrInfoHeaderLen + csrInfoLen);
197+
sha256.finalize(csrInfoSha256);
200198

201199
if (!ECCX08.ecSign(_keySlot, csrInfoSha256, signature)) {
202200
return "";

0 commit comments

Comments
 (0)