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>(
&self,
tcb_data: &TcbData<V>,
) -> Option<TcbLevel>
pub fn find_tcb_state<V: VerificationType>( &self, tcb_data: &TcbData<V>, ) -> Option<TcbLevel>
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, ) -> Result<(), 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> Deserialize<'de> for PckCert<Unverified>
impl<'de> Deserialize<'de> for PckCert<Unverified>
Source§fn deserialize<D>(deserializer: D) -> Result<PckCert<Unverified>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<PckCert<Unverified>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<V: VerificationType> Serialize for PckCert<V>
impl<V: VerificationType> Serialize for PckCert<V>
impl<V: Eq + VerificationType> Eq for PckCert<V>
impl<V: VerificationType> StructuralPartialEq for PckCert<V>
Auto Trait Implementations§
impl<V> Freeze for PckCert<V>
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> 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