pub struct RevocationSbatOwned(/* private fields */);alloc only.Expand description
Owned revocation SBAT data.
Typically this data comes from a UEFI variable such as SbatLevel.
This type is the owned version of RevocationSbat, and derefs to
that type.
Implementations§
Source§impl RevocationSbatOwned
impl RevocationSbatOwned
Sourcepub fn parse(input: &[u8]) -> Result<Self, ParseError>
pub fn parse(input: &[u8]) -> Result<Self, ParseError>
Parse SBAT data from raw CSV. This data typically comes from a
UEFI variable or a RevocationSection. Each record is parsed
as a Component.
Any data past the first null in input is ignored. A null byte
is not required to be present.
Methods from Deref<Target = RevocationSbat>§
Sourcepub fn date(&self) -> Option<&AsciiStr>
pub fn date(&self) -> Option<&AsciiStr>
Date of the revocation data, used as a comparable version. This is optional and may not be present. Versions should be compared lexicographically.
Sourcepub fn revoked_components(&self) -> RevokedComponents<'_> ⓘ
pub fn revoked_components(&self) -> RevokedComponents<'_> ⓘ
Get an iterator over the entries.
Sourcepub fn is_component_revoked(&self, input: &Component<'_>) -> bool
pub fn is_component_revoked(&self, input: &Component<'_>) -> bool
Check if the input Component is revoked.
The input is checked against each revocation component. If the
names match, and if the input’s version is less than the
version in the corresponding revocation component, the input
is considered revoked and the image will not pass validation. If
the input is not in the revocation list then it is implicitly
allowed.
Sourcepub fn validate_image<'i>(
&self,
image_sbat: &'i ImageSbat,
) -> ValidationResult<'i>
pub fn validate_image<'i>( &self, image_sbat: &'i ImageSbat, ) -> ValidationResult<'i>
Check if any component in image_sbat is revoked.
Each component in the image metadata is checked against the revocation entries. If the name matches, and if the component’s version is less than the version in the corresponding revocation entry, the component is considered revoked and the image will not pass validation. If a component is not in the revocation list then it is implicitly allowed.
Trait Implementations§
Source§impl Clone for RevocationSbatOwned
impl Clone for RevocationSbatOwned
Source§fn clone(&self) -> RevocationSbatOwned
fn clone(&self) -> RevocationSbatOwned
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more