Trait kernel::process_checker::AppCredentialsPolicy

source ·
pub trait AppCredentialsPolicy<'a> {
    // Required methods
    fn set_client(&self, client: &'a dyn AppCredentialsPolicyClient<'a>);
    fn require_credentials(&self) -> bool;
    fn check_credentials(
        &self,
        credentials: TbfFooterV2Credentials,
        integrity_region: &'a [u8]
    ) -> Result<(), (ErrorCode, TbfFooterV2Credentials, &'a [u8])>;
}
Expand description

Implements a Credentials Checking Policy.

Required Methods§

source

fn set_client(&self, client: &'a dyn AppCredentialsPolicyClient<'a>)

Set the client which gets notified after the credential check completes.

source

fn require_credentials(&self) -> bool

Whether credentials are required or not.

If this returns true, then a process will only be executed if one credential was accepted. If this returns false then a process will be executed even if no credentials are accepted.

source

fn check_credentials( &self, credentials: TbfFooterV2Credentials, integrity_region: &'a [u8] ) -> Result<(), (ErrorCode, TbfFooterV2Credentials, &'a [u8])>

Check a particular credential.

If credential checking started successfully then this returns Ok().

Implementors§

source§

impl AppCredentialsPolicy<'static> for AppCheckerSha256

source§

impl<'a> AppCredentialsPolicy<'a> for AppCheckerRsaSimulated<'a>

source§

impl<'a> AppCredentialsPolicy<'a> for AppCheckerSimulated<'a>

source§

impl<'a, S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>, const HL: usize, const SL: usize> AppCredentialsPolicy<'static> for AppCheckerSignature<'a, S, H, HL, SL>