pub struct RevocationSbat(/* private fields */);Expand description
Revocation SBAT data.
Typically this data comes from a UEFI variable such as SbatLevel.
Implementations§
Source§impl RevocationSbat
impl RevocationSbat
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.
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 Debug for RevocationSbat
impl Debug for RevocationSbat
Source§impl Ord for RevocationSbat
impl Ord for RevocationSbat
Source§impl PartialEq<&RevocationSbat> for RevocationSbatOwned
Available on crate feature alloc only.
impl PartialEq<&RevocationSbat> for RevocationSbatOwned
alloc only.Source§impl PartialEq<RevocationSbatOwned> for &RevocationSbat
Available on crate feature alloc only.
impl PartialEq<RevocationSbatOwned> for &RevocationSbat
alloc only.