review feedback

pull/772/head
Brett Nicholas 2026-04-14 15:09:05 -06:00 committed by Daniele Lacamera
parent dc2664a701
commit e43e012e98
3 changed files with 9 additions and 7 deletions

View File

@ -4,7 +4,7 @@ on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
branches: [ '**' ]
jobs:
cryptocb_simulator_tests:

View File

@ -502,17 +502,18 @@ void hal_init(void)
#if defined(WOLFBOOT_TEST_SIM_CRYPTOCB) && defined(__WOLFBOOT)
{
int cb_ret;
/* wolfCrypt_Init() must be called before RegisterDevice —
* it initializes CryptoDev[] slots to INVALID_DEVID via
* wc_CryptoCb_Init(). Ref-counted, safe to call multiple times. */
wolfCrypt_Init();
cb_ret = wc_CryptoCb_RegisterDevice(0xCB, sim_cryptocb, NULL);
/* simulator WOLFBOOT_DEVID_XXX are all the same, only need to register
* one of them for the sim test - chose hash. */
cb_ret = wc_CryptoCb_RegisterDevice(WOLFBOOT_DEVID_HASH,
sim_cryptocb, NULL);
if (cb_ret != 0) {
wolfBoot_printf("Failed to register sim crypto callback: %d\n",
cb_ret);
exit(-1);
}
wolfBoot_printf("Registered sim_cryptocb with devId 0xCB\n");
wolfBoot_printf("Registered sim_cryptocb with devId %d\n",
WOLFBOOT_DEVID_HASH);
}
#endif
}

View File

@ -360,7 +360,8 @@ uint16_t wolfBoot_find_header(uint8_t *haystack, uint16_t type, uint8_t **ptr)
}
}
#if defined(WOLFBOOT_SIGN_ECC256)
#if defined(WOLFBOOT_SIGN_ECC256) || defined(WOLFBOOT_SIGN_ECC384) || \
defined(WOLFBOOT_SIGN_ECC521)
int wc_ecc_init_ex(ecc_key* key, void* heap, int devId) {
(void)heap;
(void)devId;