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§
sourcefn set_client(&self, client: &'a dyn AppCredentialsPolicyClient<'a>)
fn set_client(&self, client: &'a dyn AppCredentialsPolicyClient<'a>)
Set the client which gets notified after the credential check completes.
sourcefn require_credentials(&self) -> bool
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.
sourcefn check_credentials(
&self,
credentials: TbfFooterV2Credentials,
integrity_region: &'a [u8],
) -> Result<(), (ErrorCode, TbfFooterV2Credentials, &'a [u8])>
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()
.