Skip to content

Commit

Permalink
Merge pull request #33 from oasisprotocol/kostko/feature/attestation-…
Browse files Browse the repository at this point in the history
…tool-early-tcb

attestation-tool: Use early TCB updates
  • Loading branch information
kostko authored Mar 4, 2024
2 parents f66c6fa + 6e67085 commit c37cfc5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion attestation-tool/Cargo.lock

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

2 changes: 1 addition & 1 deletion attestation-tool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "attestation-tool"
version = "0.2.0"
version = "0.3.1"
authors = ["Oasis Protocol Foundation", "Fortanix, Inc."]
license = "MPL-2.0"
edition = "2018"
Expand Down
7 changes: 4 additions & 3 deletions attestation-tool/src/ecdsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ pub fn try_ecdsa(aesm_client: &AesmClient, loader: &mut IsgxDevice) -> Result<TC

// Fetch TCB info from PCS.
let url = format!(
"{TCB_URL}?fmspc={fmspc_hex}",
"{TCB_URL}?fmspc={fmspc_hex}&update=early",
fmspc_hex = hex::encode(&fmspc)
);
println!("Using PCCS URL: {:?}", url);
Expand Down Expand Up @@ -354,8 +354,9 @@ pub fn try_ecdsa(aesm_client: &AesmClient, loader: &mut IsgxDevice) -> Result<TC
let report = Report::try_copy_from(&report).ok_or(anyhow!("could not construct QE3 report"))?;

// Fetch QE identity from PCS.
println!("Using PCCS URL: {:?}", QE_IDENTITY_URL);
let response = ureq::get(QE_IDENTITY_URL).call()?;
let url = format!("{QE_IDENTITY_URL}?update=early");
println!("Using PCCS URL: {:?}", url);
let response = ureq::get(&url).call()?;
let qe_identity: QEIdentityResponse = serde_json::from_str(&response.into_string()?)
.map_err(|err| anyhow!("error parsing QE identity: {}", err))?;
let qe_identity = qe_identity.enclave_identity;
Expand Down

0 comments on commit c37cfc5

Please sign in to comment.