pub struct CryptoBackend {
pub sig_algo: &'static dyn SignatureVerificationAlgorithm,
pub sha256: fn(&[u8]) -> [u8; 32],
pub sha384: fn(&[u8]) -> [u8; 48],
pub encode_ecdsa: fn(&[u8]) -> Result<Vec<u8>>,
pub parse_pck_extension: fn(&[u8]) -> Result<PckExtension>,
}Expand description
Crypto backend configuration for quote verification.
Holds the signature verification algorithm and SHA-256 implementation
needed by the verification logic. Use ring::backend() or
rustcrypto::backend() to obtain a pre-configured instance.
Fields§
§sig_algo: &'static dyn SignatureVerificationAlgorithmECDSA P-256 SHA-256 algorithm for certificate and raw signature verification
sha256: fn(&[u8]) -> [u8; 32]SHA-256 hash function
sha384: fn(&[u8]) -> [u8; 48]SHA-384 hash function (used for root_key_id computation)
encode_ecdsa: fn(&[u8]) -> Result<Vec<u8>>Raw ECDSA r || s to DER encoder.
parse_pck_extension: fn(&[u8]) -> Result<PckExtension>Parse Intel PCK extensions with the configured X.509 backend.
Auto Trait Implementations§
impl !RefUnwindSafe for CryptoBackend
impl !UnwindSafe for CryptoBackend
impl Freeze for CryptoBackend
impl Send for CryptoBackend
impl Sync for CryptoBackend
impl Unpin for CryptoBackend
impl UnsafeUnpin for CryptoBackend
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