feat(core/prodtest): improve logging in `tropic_locked_status()`
What changed, and why it matters
This commit only adds extra log/trace messages to a production-test command that checks whether a Tropic secure chip is locked. It does not change any logic, return values, access controls, or behavior of the device. There is no security issue visible in the diff.
No security action required; this is a benign logging improvement in production-test tooling.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds cli_trace() calls inside prodtest_tropic_lock_check() and get_tropic_locked_status() to improve diagnostics. All existing control flow, comparisons, and return values remain unchanged. No new inputs are parsed, no buffers are altered, and no cryptographic operations are modified.
Changed components
core/embed/projects/prodtest/cmd/prodtest_tropic.cInspect captured patch +12 / −2
diff --git a/core/embed/projects/prodtest/cmd/prodtest_tropic.c b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
index c7ccc3c3..d1ee78a3 100644
--- a/core/embed/projects/prodtest/cmd/prodtest_tropic.c
+++ b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
@@ -570,9 +570,11 @@ static void prodtest_tropic_lock_check(cli_t* cli) {
tropic_locked_status status = get_tropic_locked_status(cli);
switch (status) {
case TROPIC_LOCKED_TRUE:
+ cli_trace(cli, "Tropic is locked.");
cli_ok(cli, "YES");
break;
case TROPIC_LOCKED_FALSE:
+ cli_trace(cli, "Tropic is not locked.");
cli_ok(cli, "NO");
break;
default:
@@ -589,14 +591,16 @@ tropic_locked_status get_tropic_locked_status(cli_t* cli) {
curve25519_key tropic_public = {0};
if (secret_key_tropic_public(tropic_public) != sectrue) {
- // The Tropic pairing process was not initiated.
+ cli_trace(cli, "The Tropic pairing process was not initiated.");
return TROPIC_LOCKED_FALSE;
}
ret = tropic_custom_session_start(cli, TROPIC_PRIVILEGED_PAIRING_KEY_SLOT);
if (ret != LT_OK) {
if (ret == LT_L2_HSK_ERR) {
- // The Tropic pairing process was initiated but probably failed midway.
+ cli_trace(cli,
+ "The Tropic pairing process was initiated but probably failed "
+ "midway.");
return TROPIC_LOCKED_FALSE;
} else {
cli_error(cli, CLI_ERROR,
@@ -618,6 +622,9 @@ tropic_locked_status get_tropic_locked_status(cli_t* cli) {
if (memcmp(&g_reversible_configuration, (uint8_t*)&configuration_read,
sizeof(g_reversible_configuration)) != 0) {
+ cli_trace(cli,
+ "The reversible configuration read does not match the expected "
+ "reversible configuration.");
return TROPIC_LOCKED_FALSE;
}
@@ -631,6 +638,9 @@ tropic_locked_status get_tropic_locked_status(cli_t* cli) {
if (memcmp(&g_irreversible_configuration, (uint8_t*)&configuration_read,
sizeof(g_irreversible_configuration)) != 0) {
+ cli_trace(cli,
+ "The irreversible configuration read does not match the expected "
+ "irreversible configuration.");
return TROPIC_LOCKED_FALSE;
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.