From 9c9c6f67a7d5253720ce6e91034c1175fad448a3 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 6 Oct 2025 15:20:56 +0800 Subject: [PATCH] fixup tag return API returns a [u8;4] instead of a u32 --- bao1x-boot/boot1/src/secboot.rs | 2 +- loader/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bao1x-boot/boot1/src/secboot.rs b/bao1x-boot/boot1/src/secboot.rs index 1bb383820..9a9b88be9 100644 --- a/bao1x-boot/boot1/src/secboot.rs +++ b/bao1x-boot/boot1/src/secboot.rs @@ -35,7 +35,7 @@ pub fn boot_or_die() -> ! { Ok((k, tag)) => crate::println!( "**should be unreachable** Booted with key {}({})", k, - core::str::from_utf8(&tag.to_le_bytes()).unwrap_or("invalid tag") + core::str::from_utf8(&tag).unwrap_or("invalid tag") ), Err(e) => crate::println!("Image did not validate: {:?}", e), } diff --git a/loader/src/main.rs b/loader/src/main.rs index 6ea402181..93cece1c0 100644 --- a/loader/src/main.rs +++ b/loader/src/main.rs @@ -269,7 +269,7 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32) Ok((k, tag)) => println!( "*** Kernel signature check by key @ {}({}) OK ***", k, - core::str::from_utf8(&tag.to_le_bytes()).unwrap_or("invalid tag") + core::str::from_utf8(&tag).unwrap_or("invalid tag") ), Err(e) => { println!("Kernel failed signature check. Dying: {:?}", e); @@ -293,7 +293,7 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32) println!( "*** Detached app signature check by key @ {}({}) OK ***", k, - core::str::from_utf8(&tag.to_le_bytes()).unwrap_or("invalid tag") + core::str::from_utf8(&tag).unwrap_or("invalid tag") ); true }