WIP
This commit is contained in:
parent
02cfb3f998
commit
84dac5a47e
1 changed files with 7 additions and 5 deletions
|
@ -98,12 +98,14 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
|
|||
}
|
||||
|
||||
fn verify_signature (tcbinfo: Value, key: VerifyingKey) {
|
||||
let tcbinfo_json = tcbinfo.as_str();
|
||||
if let Err(e) = tcbinfo_json {
|
||||
println!("{tcbinfo:?}");
|
||||
}
|
||||
let signed_tcbinfo = SignedTcbInfo::try_from().expect("tcbinfo string parsing failed");
|
||||
let tcbinfo_str = tcbinfo.as_str();
|
||||
if let Some(st) = tcbinfo_str {
|
||||
let signed_tcbinfo = SignedTcbInfo::try_from(st).expect("tcbinfo string parsing failed");
|
||||
signed_tcbinfo.verify(Some(&key), None).expect("could not verify signature");
|
||||
}
|
||||
else {
|
||||
println!("{tcbinfo:?}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue