feat(core/prodtest): improve logging in `check_device_cert_chain()`
What changed, and why it matters
This commit only adds an error log message when a cryptographic signing operation fails during a production-test command. It does not change any security logic, access controls, or behavior; it merely reports the specific failure reason instead of silently returning false.
No security action required; this is a diagnostic logging improvement in production-test firmware.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In check_device_cert_chain() inside the prodtest Tropic command, the return value of lt_ecc_eddsa_sign() is now stored in ret and, on failure, printed via cli_error() using lt_ret_verbose(ret). Previously the function returned false without logging the error code. No other code paths, conditions, or signatures are altered.
Changed components
core/embed/projects/prodtest/cmd/prodtest_tropic.cInspect captured patch +5 / −2
diff --git a/core/embed/projects/prodtest/cmd/prodtest_tropic.c b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
index bc308fe48..3948cd41b 100644
--- a/core/embed/projects/prodtest/cmd/prodtest_tropic.c
+++ b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
@@ -1343,8 +1343,11 @@ static bool check_device_cert_chain(cli_t* cli, const uint8_t* chain,
ed25519_signature signature = {0};
- if (lt_ecc_eddsa_sign(tropic_get_handle(), TROPIC_DEVICE_KEY_SLOT, challenge,
- sizeof(challenge), signature) != LT_OK) {
+ lt_ret_t ret = lt_ecc_eddsa_sign(tropic_get_handle(), TROPIC_DEVICE_KEY_SLOT,
+ challenge, sizeof(challenge), signature);
+ if (ret != LT_OK) {
+ cli_error(cli, CLI_ERROR, "`lt_ecc_eddsa_sign()` failed with error '%s'",
+ lt_ret_verbose(ret));
return 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.