File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ bip39 = { workspace = true }
5757# writing, this might fluctuate over time).
5858bitcoin_hashes = { version = " 0.14.0" , default-features = false , features = [" small-hash" ] }
5959futures-lite = { workspace = true }
60+ hex_lit = { workspace = true , features = [" rust_v_1_46" ] }
6061
6162[dependencies .prost ]
6263# keep version in sync with tools/prost-build/Cargo.toml.
@@ -66,7 +67,6 @@ features = ["derive"]
6667
6768[dev-dependencies ]
6869bitbox-aes = { path = " ../bitbox-aes" }
69- hex_lit = { workspace = true }
7070
7171[features ]
7272ed25519 = [
Original file line number Diff line number Diff line change 1515use super :: Error ;
1616use super :: pb;
1717
18+ use hex_lit:: hex;
19+
1820use pb:: bluetooth_request:: Request ;
1921use pb:: bluetooth_response:: Response ;
2022
@@ -27,7 +29,9 @@ use alloc::vec::Vec;
2729
2830use bitbox02:: { memory, spi_mem} ;
2931
30- const ALLOWED_HASH : & [ u8 ; 32 ] = b"\x1e \x4a \xa8 \x36 \x4e \x93 \x5c \x07 \x85 \xe4 \xf8 \x91 \x20 \x83 \x07 \xd8 \x32 \xf7 \x88 \x17 \x2e \x4b \xf6 \x16 \x21 \xde \x6d \xf9 \xec \x3c \x21 \x5f " ;
32+ // See also bitbox-da14531-firmware.bin.sha256.
33+ const ALLOWED_HASH : [ u8 ; 32 ] =
34+ hex ! ( "1e4aa8364e935c0785e4f891208307d832f788172e4bf61621de6df9ec3c215f" ) ;
3135
3236// We want to write FW to the memory chip in erase-size chunks, so that we don't repeatedly need to
3337// read-erase-write the same sector.
@@ -159,7 +163,7 @@ async fn process_upgrade(
159163 } )
160164 . await ?;
161165
162- let response = _process_upgrade ( & mut RealFuncs , request, ALLOWED_HASH ) . await ;
166+ let response = _process_upgrade ( & mut RealFuncs , request, & ALLOWED_HASH ) . await ;
163167
164168 if response. is_ok ( ) {
165169 hal. ui ( ) . status ( "Upgrade\n successful" , true ) . await ;
You can’t perform that action at this time.
0 commit comments