From d7c1221293ae3fdd39c96be3f2aefbfb6d1b5c67 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Fri, 13 Oct 2023 13:10:15 +0200 Subject: [PATCH] feat(core): Set trust anchor data type in prodtest. [no changelog] --- core/embed/prodtest/optiga_prodtest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/embed/prodtest/optiga_prodtest.c b/core/embed/prodtest/optiga_prodtest.c index 7a3d69699..2d1e2ee90 100644 --- a/core/embed/prodtest/optiga_prodtest.c +++ b/core/embed/prodtest/optiga_prodtest.c @@ -503,6 +503,14 @@ void keyfido_write(char *data) { 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 ret = optiga_set_trust_anchor(); if (OPTIGA_SUCCESS != ret) {