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());