Skip to content

Commit

Permalink
Verifier: IBM SE add dummy claims
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Mar 11, 2024
1 parent abdf68f commit 2c44b6f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions attestation-service/verifier/src/se/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use super::*;
use async_trait::async_trait;
use anyhow::anyhow;
use base64::prelude::*;
use serde_json::json;
use crate::{InitDataHash, ReportData};
use crate::se::seattest::FakeSeAttest;
use crate::se::seattest::SeFakeVerifier;
Expand Down Expand Up @@ -64,6 +65,11 @@ async fn verify_evidence(
.await
.context("Verify SE attestation evidence failed: {:?}")?;

let v = serde_json::to_value(se).context("build json value from the se evidence")?;
Ok(v as TeeEvidenceParsedClaim)
let claims_map = json!({
"serial_number": format!("{}", "SE-ID"),
"measurement": format!("{}", BASE64_STANDARD.encode(se.clone())),
"report_data": format!("{}", BASE64_STANDARD.encode(se.clone())),
});

Ok(claims_map as TeeEvidenceParsedClaim)
}

0 comments on commit 2c44b6f

Please sign in to comment.