mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-19 11:50:58 +00:00
feat(core): Don't lock Optiga in debug builds.
[no changelog]
This commit is contained in:
parent
54c441a607
commit
ed43a5bc5b
@ -215,7 +215,8 @@ bool optiga_set_metadata(uint16_t oid, const optiga_metadata *metadata) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the metadata aren't locked, then lock them.
|
#if PRODUCTION
|
||||||
|
// If the metadata aren't locked, then lock them in production builds.
|
||||||
optiga_metadata metadata_locked = {0};
|
optiga_metadata metadata_locked = {0};
|
||||||
metadata_locked.lcso = OPTIGA_META_LCS_OPERATIONAL;
|
metadata_locked.lcso = OPTIGA_META_LCS_OPERATIONAL;
|
||||||
if (!optiga_compare_metadata(&metadata_locked, &metadata_stored)) {
|
if (!optiga_compare_metadata(&metadata_locked, &metadata_stored)) {
|
||||||
@ -231,6 +232,7 @@ bool optiga_set_metadata(uint16_t oid, const optiga_metadata *metadata) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user