1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 22:08:08 +00:00

feat(core): Set trust anchor data type in prodtest.

[no changelog]
This commit is contained in:
Andrew Kozlik 2023-10-13 13:10:15 +02:00 committed by Andrew Kozlik
parent 182a9b1ce8
commit 4fb06815b5

View File

@ -528,6 +528,14 @@ void keyfido_write(char *data) {
return; return;
} }
// Set the data type of OID 0xE0E8 to trust anchor, so that we can use it to
// write the FIDO key.
memzero(&metadata, sizeof(metadata));
metadata.data_type = OPTIGA_META_VALUE(OPTIGA_DATA_TYPE_TA);
if (!set_metadata(OID_TRUST_ANCHOR, &metadata)) {
return;
}
// Write trust anchor certificate to OID 0xE0E8 // Write trust anchor certificate to OID 0xE0E8
ret = optiga_set_trust_anchor(); ret = optiga_set_trust_anchor();
if (OPTIGA_SUCCESS != ret) { if (OPTIGA_SUCCESS != ret) {