pub struct QuoteVerifier<C: Config = DefaultConfig> { /* private fields */ }Expand description
Quote verifier with configurable root certificate and crypto backend.
Provides both the backwards-compatible report API and the detailed claims API.
Implementations§
Source§impl<C: Config> QuoteVerifier<C>
impl<C: Config> QuoteVerifier<C>
Sourcepub fn new_with_config(root_ca_der: Vec<u8>) -> Self
pub fn new_with_config(root_ca_der: Vec<u8>) -> Self
Create a verifier for C with a custom root certificate.
Sourcepub fn with_config<D: Config>(self) -> QuoteVerifier<D>
pub fn with_config<D: Config>(self) -> QuoteVerifier<D>
Select a different compile-time verification backend.
pub fn allow_service_td(self, allow: bool) -> Self
pub fn allow_debug(self, allow: bool) -> Self
Sourcepub fn verify_with_policy<P: Policy + ?Sized>(
&self,
raw_quote: &[u8],
collateral: impl Into<QuoteCollateralV3>,
now_secs: u64,
policy: &P,
) -> Result<QuoteClaims>
pub fn verify_with_policy<P: Policy + ?Sized>( &self, raw_quote: &[u8], collateral: impl Into<QuoteCollateralV3>, now_secs: u64, policy: &P, ) -> Result<QuoteClaims>
Verify a quote, apply a policy, and return detailed serializable claims.
Sourcepub fn verify(
&self,
raw_quote: &[u8],
collateral: &QuoteCollateralV3,
now_secs: u64,
) -> Result<VerifiedReport>
pub fn verify( &self, raw_quote: &[u8], collateral: &QuoteCollateralV3, now_secs: u64, ) -> Result<VerifiedReport>
Verify with the one-shot API using this verifier’s Config.
Auto Trait Implementations§
impl<C> Freeze for QuoteVerifier<C>where
PhantomData<C>: Freeze,
impl<C> RefUnwindSafe for QuoteVerifier<C>where
PhantomData<C>: RefUnwindSafe,
impl<C> Send for QuoteVerifier<C>where
PhantomData<C>: Send,
impl<C> Sync for QuoteVerifier<C>where
PhantomData<C>: Sync,
impl<C> Unpin for QuoteVerifier<C>where
PhantomData<C>: Unpin,
impl<C> UnsafeUnpin for QuoteVerifier<C>where
PhantomData<C>: UnsafeUnpin,
impl<C> UnwindSafe for QuoteVerifier<C>where
PhantomData<C>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more