fix(prodtest): continue in case of handshake error
What changed, and why it matters
This change is in a Trezor production-test tool, not the main wallet firmware. It makes the tool keep trying other pairing keys instead of stopping with an error when a handshake fails. The effect is to make the production test more tolerant of one specific expected failure condition, which is likely intended behavior for testing. There is no direct evidence this is a security fix for end users.
Treat as a minor production-test robustness change. If reviewing for security, verify that continuing on non-handshake errors cannot mask real failures during manufacturing or leak pairing-key state. No end-user action is indicated.
Security signals we found
Change is in production-test code, not runtime wallet firmware
Error-handling relaxed rather than hardened
No changelog entry provided
No explicit security context in commit message
Evidence from the diff
In core/embed/projects/prodtest/cmd/prodtest_tropic.c, the find_pairing_key() function previously called cli_error() and returned false when tropic_custom_session_start() returned anything other than success (LT_OK) or the specific handshake error (LT_L2_HSK_ERR). The patch changes that branch to log a trace message and continue iterating over remaining keys instead of aborting. This relaxes error handling for unexpected return codes during a production-test pairing-key discovery routine.
Changed components
core/embed/projects/prodtest/cmd/prodtest_tropic.cTropic secure-element production test commandsInspect captured patch +2 / −3
diff --git a/core/embed/projects/prodtest/cmd/prodtest_tropic.c b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
index c9a349f7..113a150c 100644
--- a/core/embed/projects/prodtest/cmd/prodtest_tropic.c
+++ b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
@@ -1631,11 +1631,10 @@ static bool find_pairing_key(cli_t* cli, lt_pkey_index_t* pairing_key_index) {
return true;
}
if (res != LT_L2_HSK_ERR) {
- cli_error(
- cli, CLI_ERROR,
+ cli_trace(
+ cli,
"`tropic_custom_session_start()` for key %d failed with error '%s'",
i, lt_ret_verbose(res));
- return false;
}
}
Why this scored 18/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.