mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-08 00:44:58 -04:00
WIP: verify pre loaded app 2
This commit is contained in:
parent
33bed6fc94
commit
68917cc1bb
5 changed files with 75 additions and 7 deletions
|
@ -167,3 +167,14 @@ int preload_delete(struct partition_table *part_table, uint8_t slot)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int preload_get_digsig(struct partition_table *part_table, uint8_t app_digest[32], uint8_t app_signature[64], uint8_t slot) {
|
||||
if (slot >= N_PRELOADED_APP) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy_s(app_digest, 32, part_table->pre_app_data[slot].digest, sizeof(part_table->pre_app_data[slot].digest));
|
||||
memcpy_s(app_signature, 64, part_table->pre_app_data[slot].signature, sizeof(part_table->pre_app_data[slot].signature));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue