mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-09 07:02:20 -04:00
fw: Check blake2s_init return value
This commit is contained in:
parent
92a6b70118
commit
76ba5e8ede
1 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,8 @@ static void calculate_auth_digest(uint8_t *nonce, uint8_t *auth_digest)
|
|||
blake2s_ctx ctx = {0};
|
||||
|
||||
// Generate a 16 byte authentication digest
|
||||
blake2s_init(&ctx, 16, NULL, 0);
|
||||
int blake2err = blake2s_init(&ctx, 16, NULL, 0);
|
||||
assert(blake2err == 0);
|
||||
blake2s_update(&ctx, (const void *)cdi, 32);
|
||||
blake2s_update(&ctx, nonce, 16);
|
||||
blake2s_final(&ctx, auth_digest);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue