Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Fanelli <[email protected]>
  • Loading branch information
tylerfanelli committed Mar 5, 2025
1 parent 9f973ee commit c8482d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions deps/verifier/src/intel_dcap/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::TeeEvidenceParsedClaim;
use anyhow::{anyhow, bail};
use intel_tee_quote_verification_rs::{
quote3_error_t, sgx_ql_qv_result_t, sgx_ql_qv_supplemental_t, sgx_ql_request_policy_t,
Expand All @@ -10,7 +11,6 @@ use std::ffi::CStr;
use std::mem;
use std::os::raw::c_char;
use std::time::{Duration, SystemTime};
use crate::TeeEvidenceParsedClaim;

pub async fn ecdsa_quote_verification(quote: &[u8]) -> anyhow::Result<Map<String, Value>> {
let mut supp_data: sgx_ql_qv_supplemental_t = Default::default();
Expand Down Expand Up @@ -89,11 +89,10 @@ pub async fn ecdsa_quote_verification(quote: &[u8]) -> anyhow::Result<Map<String
None,
p_supplemental_data,
)
.map_err(|e| anyhow!("tee_verify_quote failed: {:#04x}", e as u32))?;
.map_err(|e| anyhow!("tee_verify_quote failed: {:#04x}", e as u32))?;

debug!("tee_verify_quote successfully returned.");


match quote_verification_result {
sgx_ql_qv_result_t::SGX_QL_QV_RESULT_OK
| sgx_ql_qv_result_t::SGX_QL_QV_RESULT_CONFIG_NEEDED
Expand Down
6 changes: 5 additions & 1 deletion deps/verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ pub mod cca;
#[cfg(feature = "se-verifier")]
pub mod se;

#[cfg(any(feature = "az-tdx-vtpm-verifier", feature = "tdx-verifier", feature = "sgx-verifier"))]
#[cfg(any(
feature = "az-tdx-vtpm-verifier",
feature = "tdx-verifier",
feature = "sgx-verifier"
))]
pub mod intel_dcap;

pub fn to_verifier(tee: &Tee) -> Result<Box<dyn Verifier + Send + Sync>> {
Expand Down
2 changes: 1 addition & 1 deletion deps/verifier/src/tdx/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ mod tests {
use rstest::rstest;

use super::*;
use std::fs;
use crate::intel_dcap::ecdsa_quote_verification;
use std::fs;

#[rstest]
#[case("./test_data/tdx_quote_4.dat")]
Expand Down

0 comments on commit c8482d1

Please sign in to comment.