From bc3577ec17dd1e3d704fa8d4df886b3d318d3e8a Mon Sep 17 00:00:00 2001 From: Ajinkya Kulkarni Date: Wed, 4 Dec 2024 21:41:48 +0100 Subject: [PATCH] WIP --- crates/utils/tcbinfo-updater/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/utils/tcbinfo-updater/src/main.rs b/crates/utils/tcbinfo-updater/src/main.rs index c206ff1..ce57e8e 100644 --- a/crates/utils/tcbinfo-updater/src/main.rs +++ b/crates/utils/tcbinfo-updater/src/main.rs @@ -73,7 +73,11 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> { for fmspc in fmspc_list { let tcbinfo = get_tcbinfo(fmspc.clone(), "standard".to_string()).await; assert!(verify_signature(tcbinfo.clone(), key)); - let store_entry = &store[&fmspc]; + let store_entry = if store.contains_key(&fmspc) + { + &store[&fmspc] + } + else {""} if *store_entry != tcbinfo { println!("updating local TCBInfo for FMSPC: {fmspc}"); store.insert(fmspc.clone(), tcbinfo.clone());