Skip to content

Commit

Permalink
Verifier: IBM SE simplify the method
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 Apr 18, 2024
1 parent 12667a9 commit c9d7bee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions attestation-service/verifier/src/se/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

use super::*;
use async_trait::async_trait;
use anyhow::anyhow;
use base64::prelude::*;
use serde_json::json;
use crate::{InitDataHash, ReportData};
Expand All @@ -25,10 +24,7 @@ impl Verifier for SeVerifier {
expected_report_data: &ReportData,
expected_init_data_hash: &InitDataHash,
) -> Result<TeeEvidenceParsedClaim> {

verify_evidence(evidence, expected_report_data, expected_init_data_hash)
.await
.map_err(|e| anyhow!("Se Verifier: {:?}", e))
verify_evidence(evidence, expected_report_data, expected_init_data_hash).await
}

async fn generate_challenge(
Expand All @@ -39,6 +35,7 @@ impl Verifier for SeVerifier {
// TODO replace FakeSeAttest with real crate
let attester = FakeSeAttest::default();

// TODO replace the placeholder
let hkds: Vec<String> = vec![String::new(); 2];
let certk = "cert_file_path";
let signk = "sign_file_path";
Expand All @@ -60,8 +57,10 @@ async fn verify_evidence(
// TODO replace FakeSeAttest with real crate
let attester = FakeSeAttest::default();

// TODO replace the placeholder
let arpk = "arpk_file_path";
let hdr = "hdr_file_path";

let se = attester.verify(evidence, arpk, hdr)
.await
.context("Verify SE attestation evidence failed: {:?}")?;
Expand All @@ -73,4 +72,4 @@ async fn verify_evidence(
});

Ok(claims_map as TeeEvidenceParsedClaim)
}
}

0 comments on commit c9d7bee

Please sign in to comment.