1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-18 19:31:04 +00:00

feat(core): Don't lock Optiga in debug builds.

[no changelog]
This commit is contained in:
Andrew Kozlik 2023-10-06 17:49:41 +02:00 committed by Andrew Kozlik
parent 54c441a607
commit ed43a5bc5b

View File

@ -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};
metadata_locked.lcso = OPTIGA_META_LCS_OPERATIONAL;
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;
}
}
#endif
return true;
}