Skip to content

Commit b00f6fa

Browse files
authored
Project hawthorn -Binary size reduction (ARMmbed#76)
* Remove pal_crypto calls and call mbedtls api directly * Add the mbed-printf library By using this library, the code size of the bootloader will be smaller. For instructions on how to use it, check the README file of the library. * Use arm update client insecure rot * Use sd blockdevice as firmware storage (ARMmbed#60) Thus eliminating the need for a filesystem, reducing code size. Fix bug where we are hashing past the end of firmware * Trim buffer before read So that we don't attempt an read beyond the end of file. Remove no longer needed include. * Use mbed configuration system to configure blockdevice offset MBED_CONF_UPDATE_CLIENT_STORAGE_ADDRESS and MBED_CONF_UPDATE_CLIENT_STORAGE_SIZE Are used directly by the implementation pal-blockdevice This removes the need of slicing block device layer * Update mbed-printf to solve a compile error In c99 <stdbool.h> needs to be included explicitly to use the bool keyword on some platform which does not include this automatically, compilation fails. * In release script use custom compiler profile To use custom version of printf from mbed-printf * Remove PAL (ARMmbed#63) * Remove mbed client PAL dependency from bootloader * import update-client-common changes to remove pal refs * Remove mbed client PAL from bootloader (ARMmbed#65) * remove PAL from bootloader test * Fix/power cut tests (ARMmbed#66) * Trim buffer so we don't read beyond end of storage * Get around limitation of pal-blockdevice Where it cannot handle write buffer size which is not page size aligned correctly * Fix an bug when trimming buffers * Add blockdevice configuration to test mbed_app.json * Pull in fix for setting buffer size * Remove RTOS and other mbed-os components This PR removes the RTOS and other mbed-os components from the bootloader code: 1. .mbedignore contains a list of mbed-os directories that are now ignored. There are other components ignored besides the RTOS (for example mbed-printf). 2. "Mutex=PlatformMutex" in mbed_app.json is needed to fix an issue in the sd-driver library (see PelionIoT/sd-driver#68 for details). 3. the .lib updates contain fixes related to compiling the code in debug mode without mbed-printf. With these codes and using arm-none-eabi-gcc 4.9.3 (GCC ARM embedded) with the release profile in `mbed-printf/profiles/release.json`, the size of the bootloader binary image is 32328 bytes. * Allow greentea compilation (needed by tests) * greentea compilation fix for tests * Use the ARMCC fix for update-client-pal-flashiap * Enable nano.specs for GCC This will result in additional size savings. Also enable this new profile in both CircleCI and Jenkins. * Disable fflush Remove the fflush function from the image: - disable the "stdio flush at exit" option in mbed-os. - disable `tr_flush` if mbed-printf is used, since mbed-printf is not buffered. * Feature/depend on hub (ARMmbed#75) * Depend on update-client-hub which includes all relavent modules in this unified repo * Modify release script to take a compiler profile argument * Use buffer size member as indication of how many bytes need to be read. Updage firmware even if the version is the same, if the active firmware is corrupt. * Fix compilation for ODIN Clean up mbedtls config file and remove unnecessary algorithms * Set MBEDTLS_SHA256_SMALLER to reduce binary size saves 1.3k * Update hub to pull in: Conditional compilation of blockdevice IAR compilation fixes * Remove dependency on cloud client depend on update client hub directly * Use tiny.json as default build profile for release * Turn on blockdevice for power cut tests * Improve tests Build tests only for ARMCC profile Use ci raas user name and pass word Use domain name istead of ip for raas server * remove instructions on mbed-printf build profile replaced by tiny.json
1 parent c15a5a7 commit b00f6fa

25 files changed

+225
-193
lines changed

.mbedignore

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
*/test/*
2-
mbed-cloud-client-internal/factory-configurator-client/*
3-
mbed-cloud-client-internal/mbed-client/*
4-
mbed-cloud-client-internal/mbed-cloud-client/*
5-
mbed-cloud-client-internal/source/*
6-
mbed-cloud-client-internal/update-client-hub/source/*
7-
mbed-cloud-client-internal/update-client-hub/modules/atomic-queue/*
8-
mbed-cloud-client-internal/update-client-hub/modules/control-center/*
9-
mbed-cloud-client-internal/update-client-hub/modules/device-identity/*
10-
mbed-cloud-client-internal/update-client-hub/modules/firmware-manager/*
11-
mbed-cloud-client-internal/update-client-hub/modules/lwm2m-mbed/*
12-
mbed-cloud-client-internal/update-client-hub/modules/manifest-manager/*
13-
mbed-cloud-client-internal/update-client-hub/modules/monitor/*
14-
mbed-cloud-client-internal/update-client-hub/modules/source/*
15-
mbed-cloud-client-internal/update-client-hub/modules/source-http/*
16-
mbed-cloud-client-internal/update-client-hub/modules/source-http-socket/*
17-
mbed-cloud-client-internal/update-client-hub/modules/source-manager/*
18-
mbed-cloud-client-internal/update-client-hub/modules/common/source/arm_uc_scheduler.c
2+
mbed-os/rtos/*
3+
mbed-os/features/FEATURE_CLIENT/*
4+
mbed-os/features/FEATURE_COMMON_PAL/*
5+
mbed-os/features/FEATURE_UVISOR/*
6+
mbed-os/features/net/*
7+
mbed-os/features/netsocket/*
8+
mbed-os/features/storage/*
9+
mbed-os/events/*
10+
update-client-hub/source/*
11+
update-client-hub/modules/atomic-queue/*
12+
update-client-hub/modules/control-center/*
13+
update-client-hub/modules/firmware-manager/*
14+
update-client-hub/modules/manifest-manager/*
15+
update-client-hub/modules/pal-linux/*
16+
update-client-hub/modules/source/*
17+
update-client-hub/modules/source-http-socket/*
18+
update-client-hub/modules/device-identity/*
19+
update-client-hub/modules/lwm2m-mbed/*
20+
update-client-hub/modules/monitor/*
21+
update-client-hub/modules/pal-filesystem/*
22+
update-client-hub/modules/pal-target-specific/*
23+
update-client-hub/modules/source-http/*
24+
update-client-hub/modules/source-manager/*
25+
update-client-hub/modules/common/source/arm_uc_scheduler.c

Jenkinsfile

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,25 @@ def morpheusBuildStep(target,
118118

119119
// build with default setup
120120
execute("mbed ls")
121-
execute("mbed compile -m ${target} -t ${toolchain} -c -v")
121+
execute("mbed compile -m ${target} -t ${toolchain} -c -v --profile=tiny.json")
122122

123-
// setup dependencies
124-
execute("power_cut_test/setup_dependencies.sh")
123+
if (toolchain == "ARM") {
124+
// setup dependencies
125+
execute("power_cut_test/setup_dependencies.sh")
125126

126-
// build with test setup
127-
execute("mbed ls")
128-
execute("mbed compile -m ${target} -t ${toolchain} -c -v")
127+
// build with test setup
128+
execute("mbed ls")
129+
execute("mbed compile -m ${target} -t ${toolchain} -c -v --profile=tiny.json")
129130

130-
// Test with power cut hardware
131-
env.RAAS_USERNAME = "user"
132-
env.RAAS_PASSWORD = "user"
133-
env.RAAS_PYCLIENT_FORCE_REMOTE_ALLOCATION = 1
131+
// Test with power cut hardware
132+
env.RAAS_USERNAME = "ci"
133+
env.RAAS_PASSWORD = "ci"
134+
env.RAAS_PYCLIENT_FORCE_REMOTE_ALLOCATION = 1
134135

135-
if (toolchain == "ARM") {
136136
test_spec = "power_cut_test/test_spec_armcc.json"
137137

138-
execute("mbedgt --grm ${target}:raas_client:62.44.193.186:8055 -V -v --test-spec ${test_spec} -e power_cut_test/host_tests/")
139-
140-
} else if (toolchain == "GCC_ARM") {
141-
test_spec = "power_cut_test/test_spec_gcc.json"
138+
execute("mbedgt --grm ${target}:raas_client:oulab.mbedcloudtesting.com:8055 -V -v --test-spec ${test_spec} -e power_cut_test/host_tests/")
142139
}
143-
144140
}
145141
}
146142
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The interface between the bootloader and an 'update-client' have been described
1313

1414
1. Install `mbed-cli` https://github.com/ARMmbed/mbed-cli
1515
1. Run `mbed deploy` to pull in dependencies
16-
1. Compile by running `mbed compile -t GCC_ARM -m (K64F|NUCLEO_F429ZI|UBLOX_EVK_ODIN_W2)`
16+
1. Compile by running `mbed compile -t GCC_ARM -m (K64F|NUCLEO_F429ZI|UBLOX_EVK_ODIN_W2) --profile=tiny.json`
1717
1. Use this [script](https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/tools/combine_bootloader_with_app.py) to combine the bootloader with application `python tools/combine_bootloader_with_app.py -a {application.bin} -b {bootloader.bin} --app-offset {firmware_metadata_header_address+firmware_metadata_header_size} --header-offset {firmware_metadata_header_address} -o {combined.bin}`.
1818
1. Flash `{combined.bin}` to device by drag and drop.
1919

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
test:
1515
override:
1616
- mbed deploy --protocol ssh
17-
- mbed compile -m K64F -t GCC_ARM --profile=../mbed-os-linker-report/compiler_profiles/release.json
17+
- mbed compile -m K64F -t GCC_ARM --profile=tiny.json
1818
- echo $(stat --printf="%s" BUILD/K64F/GCC_ARM/mbed-bootloader-internal.bin) | tee BINSIZE # current build size
1919
post:
2020
- python ../mbed-os-linker-report/elfsize.py -i BUILD/K64F/GCC_ARM/mbed-bootloader-internal.elf

firmware_update_test/firmware_update_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "update-client-paal/arm_uc_paal_update.h"
2323
#include "bootloader_common.h"
2424
#include "active_application.h"
25-
#include "pal.h"
2625
#include "mbed.h"
2726
#include "mbedtls/sha256.h"
2827

fix-mbed-os-compile/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory contains two empty header files, meant as a temporary fix for greentea compilation when the RTOS is not enabled. See https://github.com/ARMmbed/mbed-bootloader-internal/pull/6 for more details.

fix-mbed-os-compile/cmsis_os.h

Whitespace-only changes.

fix-mbed-os-compile/rtos.h

Whitespace-only changes.

mbed-cloud-client-internal.lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

mbed-printf.lib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/ARMmbed/mbed-printf/#613c02ed3eeb09b86c7d0c6c9ae0059bd0c31ae1

mbed_app.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"macros": [
33
"MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\"",
44
"PAL_USE_FATFS_SD=1",
5-
"MAX_FIRMWARE_LOCATIONS=2",
5+
"MAX_FIRMWARE_LOCATIONS=1",
66
"MAX_COPY_RETRIES=1",
77
"SHOW_PROGRESS_BAR=1",
88
"MAX_BOOT_RETRIES=3",
9-
"PAL_CMAC_SUPPORT=0"
9+
"ARM_UC_USE_PAL_CRYPTO=0",
10+
"Mutex=PlatformMutex",
11+
"ARM_UC_USE_PAL_BLOCKDEVICE"
1012
],
1113
"config": {
1214
"firmware_metadata_header_address": {
@@ -26,7 +28,11 @@
2628
"*": {
2729
"target.features_add": ["COMMON_PAL"],
2830
"target.features_remove": ["LWIP"],
29-
"platform.stdio-baud-rate": 115200
31+
"platform.stdio-baud-rate": 115200,
32+
"update-client.storage-address": "1024*1024*64",
33+
"update-client.storage-size": "1024*1024",
34+
"update-client.storage-locations": "MAX_FIRMWARE_LOCATIONS",
35+
"platform.stdio-flush-at-exit": false
3036
},
3137
"K64F": {
3238
"firmware_metadata_header_address": "0x20000",
@@ -49,6 +55,7 @@
4955
"firmware_metadata_header_size": "0x800"
5056
},
5157
"UBLOX_EVK_ODIN_W2": {
58+
"target.device_has_remove": ["EMAC"],
5259
"firmware_metadata_header_address": "0x08020000",
5360
"update-client.application-details": "0x08020000",
5461
"firmware_metadata_header_size": "0x400"

mbedtls_mbed_client_config.h

Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -22,55 +22,13 @@
2222
/* System support */
2323
#define MBEDTLS_HAVE_ASM
2424

25-
/* Crypto flags */
25+
#define MBEDTLS_SHA256_SMALLER
2626
#define MBEDTLS_CIPHER_MODE_CTR
27-
#define MBEDTLS_CMAC_C
28-
#define MBEDTLS_PEM_WRITE_C
29-
#define MBEDTLS_X509_CSR_WRITE_C
30-
#define MBEDTLS_X509_CREATE_C
31-
//#define MBEDTLS_PLATFORM_TIME_ALT
32-
33-
/* mbed TLS feature support */
34-
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
35-
#define MBEDTLS_ECP_NIST_OPTIM
36-
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
37-
#define MBEDTLS_SSL_PROTO_TLS1_2
38-
#define MBEDTLS_SSL_PROTO_DTLS
39-
#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
40-
#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
41-
#define MBEDTLS_SSL_EXPORT_KEYS
42-
43-
/* mbed TLS modules */
44-
#define MBEDTLS_AES_C
45-
#define MBEDTLS_ASN1_PARSE_C
46-
#define MBEDTLS_ASN1_WRITE_C
47-
#define MBEDTLS_BIGNUM_C
48-
#define MBEDTLS_CIPHER_C
49-
#define MBEDTLS_CTR_DRBG_C
50-
#define MBEDTLS_ECP_C
51-
#define MBEDTLS_ENTROPY_C
52-
#define MBEDTLS_MD_C
53-
#define MBEDTLS_OID_C
54-
#define MBEDTLS_PK_C
55-
#define MBEDTLS_PK_PARSE_C
56-
#define MBEDTLS_SHA256_C
57-
#define MBEDTLS_SSL_COOKIE_C
58-
#define MBEDTLS_SSL_CLI_C
59-
#define MBEDTLS_SSL_SRV_C
60-
#define MBEDTLS_SSL_TLS_C
61-
62-
// XXX mbedclient needs these: mbedtls_x509_crt_free, mbedtls_x509_crt_init, mbedtls_x509_crt_parse
63-
#define MBEDTLS_X509_USE_C
64-
#define MBEDTLS_X509_CRT_PARSE_C
65-
// a bit wrong way to get mbedtls_ssl_conf_psk:
6627

6728
#undef MBEDTLS_SHA512_C
68-
#define MBEDTLS_ECDH_C
69-
#define MBEDTLS_GCM_C
70-
71-
#define MBEDTLS_ECDH_C
72-
#define MBEDTLS_ECDSA_C
73-
#define MBEDTLS_X509_CRT_PARSE_C
29+
#undef MBEDTLS_MD5_C
30+
#undef MBEDTLS_MD4_C
31+
#undef MBEDTLS_SHA1_C
7432

7533
// Remove RSA, save 20KB at total
7634
#undef MBEDTLS_RSA_C
@@ -87,24 +45,6 @@
8745
#undef MBEDTLS_VERSION_FEATURES
8846
#undef MBEDTLS_DEBUG_C
8947

90-
// needed for parsing the certificates
91-
#define MBEDTLS_PEM_PARSE_C
92-
// dep of the previous
93-
#define MBEDTLS_BASE64_C
94-
95-
// Needed by provisioning
96-
#define MBEDTLS_PEM_WRITE_C
97-
#define MBEDTLS_CTR_DRBG_MAX_REQUEST 2048
98-
99-
// Reduce IO buffer to save RAM, default is 16KB
100-
#define MBEDTLS_SSL_MAX_CONTENT_LEN 8096
101-
102-
// define to save 8KB RAM at the expense of ROM
103-
#define MBEDTLS_AES_ROM_TABLES
104-
105-
// Save ROM and a few bytes of RAM by specifying our own ciphersuite list
106-
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
107-
10848
#include "mbedtls/check_config.h"
10949

11050
#endif /* MBEDTLS_CUSTOM_CONFIG_H */

power_cut_test/test_mbed_app.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
"macros": [
33
"MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\"",
44
"PAL_USE_FATFS_SD=1",
5+
"MAX_FIRMWARE_LOCATIONS=1",
56
"MAX_COPY_RETRIES=1",
67
"SHOW_PROGRESS_BAR=1",
78
"MAX_BOOT_RETRIES=3",
8-
"BOOTLOADER_POWER_CUT_TEST=1"
9+
"ARM_UC_USE_PAL_CRYPTO=0",
10+
"BOOTLOADER_POWER_CUT_TEST=1",
11+
"Mutex=PlatformMutex",
12+
"ARM_UC_USE_PAL_BLOCKDEVICE"
913
],
1014
"config": {
1115
"firmware_metadata_header_address": {
@@ -24,12 +28,16 @@
2428
"target_overrides": {
2529
"*": {
2630
"target.features_add": ["COMMON_PAL"],
27-
"platform.stdio-baud-rate": 9600
31+
"platform.stdio-baud-rate": 9600,
32+
"target.features_remove": ["LWIP"],
33+
"update-client.storage-address": "1024*1024*64",
34+
"update-client.storage-size": "1024*1024",
35+
"update-client.storage-locations": "MAX_FIRMWARE_LOCATIONS"
2836
},
2937
"K64F": {
3038
"firmware_metadata_header_address": "0x20000",
3139
"update-client.application-details": "0x20000",
3240
"firmware_metadata_header_size": "0x400"
3341
}
3442
}
35-
}
43+
}

scripts/make_release.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
targets = ["K64F", "NUCLEO_F429ZI", "UBLOX_EVK_ODIN_W2"]
2323
toolchain = "GCC_ARM"
24-
profile = "release"
24+
profile = "tiny.json" # default value, changed via command line argment --profile
2525
bootloader_repo_name = os.path.basename(os.getcwd())
2626

2727
def check_clean():
@@ -86,6 +86,9 @@ def find_offset(map_file, symbol):
8686
parser.add_argument('-o', '--output', required=True,
8787
help='Path to top level example application')
8888

89+
parser.add_argument('-p', '--profile', required=False,
90+
help='Compiler profile for mbed os')
91+
8992
# workaround for http://bugs.python.org/issue9694
9093
parser._optionals.title = "arguments"
9194

@@ -98,6 +101,8 @@ def find_offset(map_file, symbol):
98101
print args.output, "is not a readable directory"
99102
sys.exit(1)
100103

104+
profile = args.profile
105+
101106
# write SHA1 into mbed_bootloader_info.h
102107
patch_version()
103108

source/active_application.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
#include "active_application.h"
2424
#include "bootloader_common.h"
2525

26-
#include "update-client-common/arm_uc_utilities.h"
2726
#include "update-client-common/arm_uc_metadata_header_v2.h"
27+
#include "update-client-common/arm_uc_utilities.h"
2828
#include "update-client-paal/arm_uc_paal_update.h"
29+
#include "mbedtls/sha256.h"
2930
#include "mbed.h"
3031

3132
#include <inttypes.h>
@@ -123,10 +124,11 @@ int checkActiveApplication(arm_uc_firmware_details_t* details)
123124
tr_debug("app size: %" PRIu64, details->size);
124125

125126
/* initialize hashing facility */
126-
palMDHandle_t md = { 0 };
127-
pal_mdInit(&md, PAL_SHA256);
127+
mbedtls_sha256_context mbedtls_ctx;
128+
mbedtls_sha256_init(&mbedtls_ctx);
129+
mbedtls_sha256_starts(&mbedtls_ctx, 0);
128130

129-
uint8_t SHA[PAL_SHA256_SIZE] = { 0 };
131+
uint8_t SHA[SIZEOF_SHA256] = { 0 };
130132
uint32_t remaining = details->size;
131133
int32_t status = 0;
132134

@@ -143,7 +145,7 @@ int checkActiveApplication(arm_uc_firmware_details_t* details)
143145
readSize);
144146

145147
/* update hash */
146-
pal_mdUpdate(md, buffer_array, readSize);
148+
mbedtls_sha256_update(&mbedtls_ctx, buffer_array, readSize);
147149

148150
/* update remaining bytes */
149151
remaining -= readSize;
@@ -155,11 +157,11 @@ int checkActiveApplication(arm_uc_firmware_details_t* details)
155157
}
156158

157159
/* finalize hash */
158-
pal_mdFinal(md, SHA);
159-
pal_mdFree(&md);
160+
mbedtls_sha256_finish(&mbedtls_ctx, SHA);
161+
mbedtls_sha256_free(&mbedtls_ctx);
160162

161163
/* compare calculated hash with hash from header */
162-
int diff = memcmp(details->hash, SHA, PAL_SHA256_SIZE);
164+
int diff = memcmp(details->hash, SHA, SIZEOF_SHA256);
163165

164166
if (diff == 0)
165167
{
@@ -306,6 +308,10 @@ bool writeActiveFirmware(uint32_t index, arm_uc_firmware_details_t* details)
306308
/* clear most recent UCP event */
307309
event_callback = CLEAR_EVENT;
308310

311+
/* set the number of bytes expected */
312+
buffer.size = (details->size - offset) > buffer.size_max ?
313+
buffer.size_max : (details->size - offset);
314+
309315
/* fill buffer using UCP */
310316
arm_uc_error_t ucp_status = ARM_UCP_Read(index, offset, &buffer);
311317

source/active_application.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
#include "update-client-paal/arm_uc_paal_update_api.h"
2020

21-
#include "pal.h"
22-
2321
#include <stdint.h>
2422

2523
bool activeStorageInit(void);

source/bootloader_common.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ void arm_ucp_event_handler(uint32_t event)
4444
* Helper function to print a SHA-256 in a nice format.
4545
* @param [in] SHA The array of PAL_SHA256_SIZE containing the SHA256
4646
*/
47-
void printSHA256(const uint8_t SHA[PAL_SHA256_SIZE])
47+
void printSHA256(const uint8_t SHA[SIZEOF_SHA256])
4848
{
4949
/* allocate space for string */
50-
char buffer[2 * PAL_SHA256_SIZE + 1] = { 0 };
50+
char buffer[2 * SIZEOF_SHA256 + 1] = { 0 };
5151

52-
for (uint_least8_t index = 0; index < PAL_SHA256_SIZE; index++)
52+
for (uint_least8_t index = 0; index < SIZEOF_SHA256; index++)
5353
{
5454
uint8_t value = SHA[index];
5555

0 commit comments

Comments
 (0)