Skip to content

Commit

Permalink
Attester: Update CSV evidence format
Browse files Browse the repository at this point in the history
Signed-off-by: Jiale Zhang <[email protected]>
  • Loading branch information
jialez0 committed Nov 28, 2023
1 parent 3b0708e commit 1f13f30
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions attestation-agent/attester/src/csv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ struct CertificateChain {
struct CsvEvidence {
attestation_report: AttestationReport,
cert_chain: CertificateChain,
// Base64 Encoded CSV Seriail Number (Used to identify HYGON chip ID)
serial_number: Vec<u8>,
}

#[derive(Debug, Default)]
Expand Down Expand Up @@ -59,6 +61,7 @@ impl Attester for CsvAttester {
let evidence = CsvEvidence {
attestation_report,
cert_chain: CertificateChain { hsk, cek, pek },
serial_number: report_signer.sn.to_vec(),
};
serde_json::to_string(&evidence).context("Serialize CSV evidence failed")
}
Expand Down

0 comments on commit 1f13f30

Please sign in to comment.