pub struct KernelVerifier;Expand description
Verifier for kernel images extracted from RVF stores.
Implementations§
Source§impl KernelVerifier
impl KernelVerifier
Sourcepub fn verify(
header_bytes: &[u8; 128],
image_bytes: &[u8],
) -> Result<VerifiedKernel, KernelError>
pub fn verify( header_bytes: &[u8; 128], image_bytes: &[u8], ) -> Result<VerifiedKernel, KernelError>
Verify that a kernel image matches the hash in its header.
Parses the 128-byte KernelHeader from header_bytes, computes the
SHA3-256 hash of image_bytes, and checks it matches image_hash
in the header.
Sourcepub fn verify_with_binding(
header_bytes: &[u8; 128],
binding_bytes: &[u8; 128],
image_bytes: &[u8],
) -> Result<(VerifiedKernel, KernelBinding), KernelError>
pub fn verify_with_binding( header_bytes: &[u8; 128], binding_bytes: &[u8; 128], image_bytes: &[u8], ) -> Result<(VerifiedKernel, KernelBinding), KernelError>
Verify a kernel+binding pair, checking both the image hash and that the binding version is valid.
Auto Trait Implementations§
impl Freeze for KernelVerifier
impl RefUnwindSafe for KernelVerifier
impl Send for KernelVerifier
impl Sync for KernelVerifier
impl Unpin for KernelVerifier
impl UnwindSafe for KernelVerifier
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