btc: enable Test Merchant for payment requests in the simulator
What changed, and why it matters
This commit enables a fake 'Test Merchant' identity used only for simulator-based automated tests. It does not change production firmware behavior and is not a security fix or vulnerability.
No security action needed; treat as a normal test-infrastructure change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change expands a Rust #[cfg] guard from feature=’testing’ to feature=’testing’ or ‘c-unit-testing’ so the hardcoded ‘Test Merchant’ public key is compiled into the simulator build. The private key is a placeholder of repeated ‘a’ bytes, clearly intended only for testing. Production firmware does not use the c-unit-testing feature, so no real merchant identity logic is affected.
Changed components
src/rust/bitbox02-rust/src/hww/api/bitcoin/payment_request.rssimulator build configurationInspect captured patch +4 / −3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee522dc..b9acc44 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
- Change title when entering recovery words to `1 of 24`, `2 of 24`, etc.
- Unlock is now faster after password/passphrase entry (shorter unlock animation)
- Remove option to restore from 18 recovery words
+- simulator: enable Test Merchant for payment requests
### 9.23.1
- EVM: add HyperEVM (HYPE) and SONIC (S) to known networks
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d6c131..0db7544 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,8 +95,8 @@ endif()
#
# Versions MUST contain three parts and start with lowercase 'v'.
# Example 'v1.0.0'. They MUST not contain a pre-release label such as '-beta'.
-set(FIRMWARE_VERSION "v9.23.1")
-set(FIRMWARE_BTC_ONLY_VERSION "v9.23.1")
+set(FIRMWARE_VERSION "v9.24.0")
+set(FIRMWARE_BTC_ONLY_VERSION "v9.24.0")
set(BOOTLOADER_VERSION "v1.1.2")
find_package(PythonInterp 3.6 REQUIRED)
diff --git a/src/rust/bitbox02-rust/src/hww/api/bitcoin/payment_request.rs b/src/rust/bitbox02-rust/src/hww/api/bitcoin/payment_request.rs
index dba5c93..5004c85 100644
--- a/src/rust/bitbox02-rust/src/hww/api/bitcoin/payment_request.rs
+++ b/src/rust/bitbox02-rust/src/hww/api/bitcoin/payment_request.rs
@@ -44,7 +44,7 @@ const IDENTITIES: &[Identity] = &[
name: "POCKET",
public_key: b"\x02\x29\x02\xb4\xed\xe4\x82\xa9\x07\xce\x16\xa1\xc6\x34\x14\x5e\x72\x8f\x1d\xe4\xf2\x49\x04\x3a\x8b\xe4\x7d\xf2\x7d\xb9\x32\x0c\x2c",
},
- #[cfg(feature = "testing")]
+ #[cfg(any(feature = "testing", feature = "c-unit-testing"))]
Identity {
name: "Test Merchant",
// private_key: b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
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.