diff --git a/deps/verifier/src/sgx/claims.rs b/deps/verifier/src/sgx/claims.rs index c47fa448ab..c513f49d12 100644 --- a/deps/verifier/src/sgx/claims.rs +++ b/deps/verifier/src/sgx/claims.rs @@ -39,7 +39,6 @@ //! ``` use anyhow::*; -use byteorder::{LittleEndian, ReadBytesExt}; use serde_json::{Map, Value}; use crate::TeeEvidenceParsedClaim; @@ -112,37 +111,6 @@ pub fn generate_parsed_claims(quote: sgx_quote3_t) -> Result { - pub descriptor: [u8; 16], - pub info_length: u32, - pub data: &'a [u8], -} - -impl<'a> TryFrom<&'a [u8]> for TdShimPlatformConfigInfo<'a> { - type Error = anyhow::Error; - - fn try_from(data: &'a [u8]) -> std::result::Result { - if data.len() < core::mem::size_of::<[u8; 16]>() + core::mem::size_of::() { - bail!("give data slice is too short"); - } - - let descriptor = data[0..core::mem::size_of::<[u8; 16]>()].try_into()?; - let info_length = (&data[core::mem::size_of::<[u8; 16]>() - ..core::mem::size_of::<[u8; 16]>() + core::mem::size_of::()]) - .read_u32::()?; - let data = &data[core::mem::size_of::<[u8; 16]>() + core::mem::size_of::() - ..core::mem::size_of::<[u8; 16]>() - + core::mem::size_of::() - + info_length as usize]; - Ok(Self { - descriptor, - info_length, - data, - }) - } -} - #[cfg(test)] mod tests { use assert_json_diff::assert_json_eq; diff --git a/deps/verifier/src/tdx/mod.rs b/deps/verifier/src/tdx/mod.rs index 6878f214a6..a33d24d674 100644 --- a/deps/verifier/src/tdx/mod.rs +++ b/deps/verifier/src/tdx/mod.rs @@ -13,7 +13,7 @@ use quote::{ecdsa_quote_verification, parse_tdx_quote}; use serde::{Deserialize, Serialize}; pub(crate) mod claims; -mod eventlog; +pub mod eventlog; pub(crate) mod quote; #[derive(Serialize, Deserialize, Debug)]