Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Bump az-snp-vtpm dep to v0.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Magnus Kulke <[email protected]>
  • Loading branch information
mkulke committed Oct 4, 2023
1 parent f9a93e4 commit 57bd483
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions 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-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ anyhow.workspace = true
asn1-rs = { version = "0.5.1", optional = true }
async-trait.workspace = true
as-types = { path = "../as-types" }
az-snp-vtpm = { git = "https://github.com/kinvolk/azure-cvm-tooling", rev = "09a8a0d", default-features = false, features = ["verifier"], optional = true }
az-snp-vtpm = { version = "0.3.0", default-features = false, features = ["verifier"], optional = true }
base64 = "0.21"
bincode = "1.3.3"
byteorder = "1"
Expand Down
5 changes: 2 additions & 3 deletions attestation-service/src/verifier/az_snp_vtpm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::{Attestation, TeeEvidenceParsedClaim, Verifier};
use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use az_snp_vtpm::certs::{AmdChain, Vcek, X509};
use az_snp_vtpm::hcl::{HclData, RuntimeData};
use az_snp_vtpm::hcl::HclData;
use az_snp_vtpm::report::Validateable;
use az_snp_vtpm::vtpm::{Quote, VerifyVTpmQuote};
use base64::Engine;
Expand Down Expand Up @@ -57,8 +57,7 @@ impl Verifier for AzSnpVtpm {
}

fn verify_quote(quote: &Quote, hcl_data: &HclData, hashed_nonce: &[u8]) -> Result<()> {
let runtime_data: RuntimeData = hcl_data.var_data().try_into()?;
let ak_pub = runtime_data.get_attestation_key()?;
let ak_pub = hcl_data.var_data().ak_pub()?;

ak_pub
.verify_quote(quote, hashed_nonce)
Expand Down

0 comments on commit 57bd483

Please sign in to comment.