pub struct PckCert<V: VerificationType = Verified> { /* private fields */ }Implementations§
Source§impl PckCert<Unverified>
impl PckCert<Unverified>
pub fn from_pck_chain( certs: Vec<Cow<'_, str>>, ) -> Result<PckCert<Unverified>, Error>
Sourcepub fn new(cert: String, ca_chain: Vec<String>) -> PckCert<Unverified>
pub fn new(cert: String, ca_chain: Vec<String>) -> PckCert<Unverified>
Creates a new PckCert from the PCK certificate and CA chain. The root certificate must be the last certificate in the chain
pub fn read_from_file(input_dir: &str, filename: &str) -> Result<Self, Error>
Source§impl PckCert<Verified>
impl PckCert<Verified>
Sourcepub fn find_tcb_state<V: VerificationType, T: PlatformTypeForTcbInfo>(
&self,
tcb_data: &TcbData<T, V>,
) -> Option<TcbLevel<T::PlatformSpecificTcbComponentData>>
pub fn find_tcb_state<V: VerificationType, T: PlatformTypeForTcbInfo>( &self, tcb_data: &TcbData<T, V>, ) -> Option<TcbLevel<T::PlatformSpecificTcbComponentData>>
Selects the highest matching TCB level see https://api.portal.trustedservices.intel.com/documentation#pcs-tcb-info-v2
pub fn ppid(&self) -> Result<Vec<u8>, ASN1Error>
pub fn fmspc(&self) -> Result<Fmspc, ASN1Error>
Source§impl<V: VerificationType> PckCert<V>
impl<V: VerificationType> PckCert<V>
pub fn pck_pem<'a>(&'a self) -> &'a String
pub fn write_to_file( &self, output_dir: &str, filename: &str, option: WriteOptions, ) -> Result<Option<PathBuf>, Error>
pub fn sgx_extension(&self) -> Result<SGXPCKCertificateExtension, ASN1Error>
pub fn platform_tcb(&self) -> Result<PlatformTCB, ASN1Error>
pub fn sgx_type(&self) -> Result<SGXType, ASN1Error>
Trait Implementations§
Source§impl<'de, V> Deserialize<'de> for PckCert<V>where
V: Deserialize<'de> + VerificationType,
impl<'de, V> Deserialize<'de> for PckCert<V>where
V: Deserialize<'de> + VerificationType,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<V: Eq + VerificationType> Eq for PckCert<V>
Source§impl<V: VerificationType> Serialize for PckCert<V>
impl<V: VerificationType> Serialize for PckCert<V>
impl<V: PartialEq + VerificationType> StructuralPartialEq for PckCert<V>
Auto Trait Implementations§
impl<V> Forget for PckCert<V>
impl<V> Freeze for PckCert<V>where
V: Freeze,
impl<V> RefUnwindSafe for PckCert<V>where
V: RefUnwindSafe,
impl<V> Send for PckCert<V>where
V: Send,
impl<V> Sync for PckCert<V>where
V: Sync,
impl<V> Unpin for PckCert<V>where
V: Unpin,
impl<V> UnsafeUnpin for PckCert<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for PckCert<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more