Skip to content

Commit

Permalink
initdata: add initdata hash in ibmse evidence
Browse files Browse the repository at this point in the history
- add initdata hash in ibmse evidence,
- the initdata hash will be checked by AS policy service as a claim field.

Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Jul 17, 2024
1 parent 3cbdf1b commit 80f1a5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion attestation-agent/attester/src/se/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ use pv::{
use serde::{Deserialize, Serialize};
use serde_json;
use serde_with::{base64::Base64, serde_as};
use std::fs;

const CHECK_SUM_FILE: &str = "/run/peerpod/checksum.txt";

pub fn detect_platform() -> bool {
misc::pv_guest_bit_set()
Expand Down Expand Up @@ -71,7 +74,7 @@ impl Attester for SeAttester {
encr_request_nonce,
image_hdr_tags,
} = request;
let user_data = vec![0];
let user_data = fs::read(CHECK_SUM_FILE)?;
let mut uvc: AttestationCmd = AttestationCmd::new_request(
request_blob.into(),
Some(user_data.to_vec()),
Expand Down

0 comments on commit 80f1a5a

Please sign in to comment.