From bf1ff20c20e6cf733a73ee352991daeef3140f90 Mon Sep 17 00:00:00 2001 From: Lawrence Hunter Date: Mon, 19 Feb 2024 21:18:46 +0000 Subject: [PATCH] Improve panicing in verification --- src/verification.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/verification.rs b/src/verification.rs index ec0e937..78c9a3e 100644 --- a/src/verification.rs +++ b/src/verification.rs @@ -410,6 +410,7 @@ pub fn verify_kernel() -> Result<(), ed25519_compact::Error> { println!("Stored kernel hashed:"); pretty_print_slice(hash.as_slice()); + // For the key access the libraries own error message is more useful println!("Loading server public key..."); let public_key = ed25519_compact::PublicKey::from_slice(crate::helper::PUBLIC_KEY) @@ -427,6 +428,7 @@ pub fn verify_kernel() -> Result<(), ed25519_compact::Error> { 64, ) }; + let signature = ed25519_compact::Signature::from_slice(signature_bytes).unwrap(); println!("Loaded kernel signature:");