This commit is contained in:
Ajinkya Kulkarni 2024-12-04 20:27:58 +01:00
parent 7dc0312be3
commit 86bd351398

View file

@ -98,7 +98,11 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
}
fn verify_signature (tcbinfo: Value, key: VerifyingKey) {
let signed_tcbinfo = SignedTcbInfo::try_from(tcbinfo.as_str().expect("failed to parse tcbinfo json")).expect("tcbinfo string parsing failed");
tcbinfo_json = tcbinfo.as_str();
if let Err(e) = tcbinfo_json {
println!("{tcbinfo:?}");
}
let signed_tcbinfo = SignedTcbInfo::try_from().expect("tcbinfo string parsing failed");
signed_tcbinfo.verify(Some(&key), None).expect("could not verify signature");
}