pub struct AppCheckerSha256 { /* private fields */ }Expand description
A Credentials Checking Policy that only runs Userspace Binaries which have a unique SHA256 credential.
A Userspace Binary without a SHA256 credential fails checking, and only one Userspace Binary with a particular SHA256 hash runs at any time.
Implementations§
Source§impl AppCheckerSha256
impl AppCheckerSha256
pub fn new( hash: &'static dyn Sha256Verifier<'static>, buffer: &'static mut [u8; 32], ) -> AppCheckerSha256
Trait Implementations§
Source§impl AppCredentialsPolicy<'static> for AppCheckerSha256
impl AppCredentialsPolicy<'static> for AppCheckerSha256
Source§fn require_credentials(&self) -> bool
fn require_credentials(&self) -> bool
Whether credentials are required or not. Read more
Source§fn check_credentials(
&self,
credentials: TbfFooterV2Credentials,
binary: &'static [u8],
) -> Result<(), (ErrorCode, TbfFooterV2Credentials, &'static [u8])>
fn check_credentials( &self, credentials: TbfFooterV2Credentials, binary: &'static [u8], ) -> Result<(), (ErrorCode, TbfFooterV2Credentials, &'static [u8])>
Check a particular credential. Read more
Source§fn set_client(&self, client: &'static dyn AppCredentialsPolicyClient<'static>)
fn set_client(&self, client: &'static dyn AppCredentialsPolicyClient<'static>)
Set the client which gets notified after the credential check completes.
Source§impl ClientData<32> for AppCheckerSha256
impl ClientData<32> for AppCheckerSha256
Source§fn add_mut_data_done(
&self,
_result: Result<(), ErrorCode>,
_data: SubSliceMut<'static, u8>,
)
fn add_mut_data_done( &self, _result: Result<(), ErrorCode>, _data: SubSliceMut<'static, u8>, )
Called when the data has been added to the digest. Read more
Source§impl ClientHash<32> for AppCheckerSha256
impl ClientHash<32> for AppCheckerSha256
Source§impl ClientVerify<32> for AppCheckerSha256
impl ClientVerify<32> for AppCheckerSha256
Auto Trait Implementations§
impl !Freeze for AppCheckerSha256
impl !RefUnwindSafe for AppCheckerSha256
impl !Send for AppCheckerSha256
impl !Sync for AppCheckerSha256
impl !UnwindSafe for AppCheckerSha256
impl Unpin for AppCheckerSha256
impl UnsafeUnpin for AppCheckerSha256
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