Skip to content

Commit 0723387

Browse files
committed
fixup! fixup! feat(core/prodtest): implement tropic prodtest properly
1 parent 04474e3 commit 0723387

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/embed/projects/prodtest/cmd/prodtest_tropic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ static lt_ret_t data_write(lt_handle_t* h, uint16_t first_slot,
13551355
}
13561356

13571357
static lt_ret_t data_read(lt_handle_t* h, uint16_t first_slot,
1358-
uint16_t slots_count, uint8_t* data,
1358+
uint16_t slots_count, const uint8_t* data,
13591359
size_t max_data_length, size_t* data_length) {
13601360
const uint16_t last_data_slot = first_slot + slots_count - 1;
13611361
if (slots_count == 0 || last_data_slot > R_MEM_DATA_SLOT_MAX) {
@@ -1410,7 +1410,7 @@ static bool check_device_cert_chain(cli_t* cli, const uint8_t* chain,
14101410
sizeof(challenge), signature) != LT_OK) {
14111411
return false;
14121412
}
1413-
1413+
14141414
if (!check_cert_chain(cli, chain, chain_size, signature, sizeof(signature),
14151415
challenge)) {
14161416
return false;
@@ -1556,6 +1556,7 @@ static void prodtest_tropic_certfido_write(cli_t* cli) {
15561556

15571557
static void prodtest_tropic_certdev_write(cli_t* cli) {
15581558
cert_write(cli, TROPIC_DEV_CERT_FIRST_SLOT, TROPIC_DEV_CERT_SLOTS_COUNT);
1559+
// TODO: Parse the device serial number from the certificate and verify that it matches the device serial number written by `otp-device-sn-write`. Do the same for the MCU device certificate and the Optiga device certificate.
15591560
}
15601561

15611562
static void prodtest_tropic_certfido_read(cli_t* cli) {

0 commit comments

Comments
 (0)