File tree 1 file changed +5
-8
lines changed
examples/utility/SelfProvisioning
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 19
19
* INCLUDE
20
20
******************************************************************************/
21
21
22
- #include < ArduinoBearSSL.h>
23
-
24
- #include " bearssl/bearssl_hash.h"
25
22
#include < ArduinoECCX08.h>
26
-
23
+ # include " SHA256.h "
27
24
#include " ECCX08Cert.h"
28
25
29
26
/* *****************************************************************************
@@ -190,13 +187,13 @@ String ECCX08CertClass::endCSR() {
190
187
*out++ = 0xa0 ;
191
188
*out++ = 0x00 ;
192
189
193
- br_sha256_context sha256Context ;
190
+ SHA256 sha256 ;
194
191
byte csrInfoSha256[64 ];
195
192
byte signature[64 ];
196
193
197
- br_sha256_init (&sha256Context );
198
- br_sha256_update (&sha256Context, csrInfo, csrInfoHeaderLen + csrInfoLen);
199
- br_sha256_out (&sha256Context, csrInfoSha256);
194
+ sha256. begin ( );
195
+ sha256. update ( csrInfo, csrInfoHeaderLen + csrInfoLen);
196
+ sha256. finalize ( csrInfoSha256);
200
197
201
198
if (!ECCX08.ecSign (_keySlot, csrInfoSha256, signature)) {
202
199
return " " ;
You can’t perform that action at this time.
0 commit comments