diff --git a/core/types/src/quote.rs b/core/types/src/quote.rs index cf165625..65007256 100644 --- a/core/types/src/quote.rs +++ b/core/types/src/quote.rs @@ -125,67 +125,67 @@ impl_newtype! { pub trait BaseQuote { /// Provides access to the [`RawQuote`] to perform the common lookup /// operations on the basic quote type. - fn raw_quote(&self) -> &RawQuote; + fn _raw_quote(&self) -> &RawQuote; /// Version of the quote - fn version(&self) -> Version { - let bytes = self.raw_quote().bytes[..2] + fn _version(&self) -> Version { + let bytes = self._raw_quote().bytes[..2] .try_into() .expect("Quote bytes aren't big enough to hold `version`"); u16::from_le_bytes(bytes).into() } /// The signature type - fn signature_type(&self) -> Result { - let bytes = self.raw_quote().bytes[2..4] + fn _signature_type(&self) -> Result { + let bytes = self._raw_quote().bytes[2..4] .try_into() .expect("Quote bytes aren't big enough to hold `sign_type`"); sgx_quote_sign_type_t(u16::from_le_bytes(bytes) as u32).try_into() } /// EPID group id - fn epid_group_id(&self) -> EpidGroupId { - let bytes: [u8; 4] = self.raw_quote().bytes[4..8] + fn _epid_group_id(&self) -> EpidGroupId { + let bytes: [u8; 4] = self._raw_quote().bytes[4..8] .try_into() .expect("Quote bytes aren't big enough to hold `epid_group_id`"); bytes.into() } /// Quoting enclave (QE) SVN (Security Version Number) - fn quoting_enclave_svn(&self) -> IsvSvn { - let bytes = self.raw_quote().bytes[8..10] + fn _quoting_enclave_svn(&self) -> IsvSvn { + let bytes = self._raw_quote().bytes[8..10] .try_into() .expect("Quote bytes aren't big enough to hold `qe_svn`"); u16::from_le_bytes(bytes).into() } /// Provisioning certification enclave (PCE) SVN (Security Version Number) - fn provisioning_certification_enclave_svn(&self) -> IsvSvn { - let bytes = self.raw_quote().bytes[10..12] + fn _provisioning_certification_enclave_svn(&self) -> IsvSvn { + let bytes = self._raw_quote().bytes[10..12] .try_into() .expect("Quote bytes aren't big enough to hold `pce_svn`"); u16::from_le_bytes(bytes).into() } /// Extended EPID group id - fn extended_epid_group_id(&self) -> EpidGroupId { - let bytes: [u8; 4] = self.raw_quote().bytes[12..16] + fn _extended_epid_group_id(&self) -> EpidGroupId { + let bytes: [u8; 4] = self._raw_quote().bytes[12..16] .try_into() .expect("Quote bytes aren't big enough to hold `xeid`"); bytes.into() } /// Basename - fn basename(&self) -> Basename { - let bytes: [u8; BASENAME_SIZE] = self.raw_quote().bytes[16..48] + fn _basename(&self) -> Basename { + let bytes: [u8; BASENAME_SIZE] = self._raw_quote().bytes[16..48] .try_into() .expect("Quote bytes aren't big enough to hold `basename`"); bytes.into() } /// Report body - fn report_body(&self) -> Result { - self.raw_quote().bytes[48..432].try_into() + fn _report_body(&self) -> Result { + self._raw_quote().bytes[48..432].try_into() } } @@ -200,7 +200,7 @@ impl<'a> From<&'a [u8]> for RawQuote<'a> { pub struct Quote<'a>(RawQuote<'a>); impl BaseQuote for Quote<'_> { - fn raw_quote(&self) -> &RawQuote { + fn _raw_quote(&self) -> &RawQuote { &self.0 } } diff --git a/sdk-tools/src/edger8r.rs b/sdk-tools/src/edger8r.rs index 5fd4b944..b0f25761 100644 --- a/sdk-tools/src/edger8r.rs +++ b/sdk-tools/src/edger8r.rs @@ -7,12 +7,10 @@ use displaydoc::Display; use std::{ - borrow::ToOwned, env, io::Error as IoError, path::{Path, PathBuf}, process::Command, - string::String, }; /// Errors which can occur when working with the edger8r tool.