mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-07-15 19:29:21 -04:00
fw: Use existing compute_app_digest function when loading from client
This commit is contained in:
parent
06f67f3eec
commit
16e478a993
1 changed files with 1 additions and 4 deletions
|
@ -294,7 +294,6 @@ static enum state loading_commands(const struct frame_header *hdr,
|
|||
ctx->left -= nbytes;
|
||||
|
||||
if (ctx->left == 0) {
|
||||
blake2s_ctx b2s_ctx = {0};
|
||||
int blake2err = 0;
|
||||
|
||||
debug_puts("Fully loaded ");
|
||||
|
@ -303,9 +302,7 @@ static enum state loading_commands(const struct frame_header *hdr,
|
|||
|
||||
// Compute Blake2S digest of the app,
|
||||
// storing it for FW_STATE_RUN
|
||||
blake2err = blake2s(&ctx->digest, 32, NULL, 0,
|
||||
(const void *)TK1_RAM_BASE,
|
||||
*app_size, &b2s_ctx);
|
||||
blake2err = compute_app_digest(ctx->digest);
|
||||
assert(blake2err == 0);
|
||||
print_digest(ctx->digest);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue