mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-14 09:25:49 -04:00
Introduce symbolic names for present and present & authenticated
A preloaded app can be: - present and not yet authenticated (0x01) - present and authenticated (0x02) Let's use symbolic names for these.
This commit is contained in:
parent
980a3c84a1
commit
c359a52905
3 changed files with 9 additions and 4 deletions
|
@ -375,10 +375,10 @@ static void run_flash(const struct context *ctx, struct partition_table *part_ta
|
|||
// CDI = hash(uds, hash(app), uss)
|
||||
compute_cdi(ctx->digest, ctx->use_uss, ctx->uss);
|
||||
|
||||
if (part_table->pre_app_data.status == 0x02) {
|
||||
if (part_table->pre_app_data.status == PRE_LOADED_STATUS_PRESENT) {
|
||||
debug_puts("Create auth\n");
|
||||
auth_app_create(&part_table->pre_app_data.auth);
|
||||
part_table->pre_app_data.status = 0x01;
|
||||
part_table->pre_app_data.status = PRE_LOADED_STATUS_AUTH;
|
||||
part_table_write(part_table);
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@ int main(void)
|
|||
assert(digest_err == 0);
|
||||
print_digest(ctx.digest);
|
||||
|
||||
part_table.pre_app_data.status = 0x02;
|
||||
part_table.pre_app_data.status = PRE_LOADED_STATUS_PRESENT;
|
||||
|
||||
state = FW_STATE_RUN_FLASH;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue