pub struct RevocationSection<'a> { /* private fields */ }Expand description
Revocation data embedded in the .sbatlevel section of a shim executable.
This section was added to shim in version 15.7 so that the revocation data can be inspected by code outside of shim.
§Data format
The section starts with three u32 fields:
- Version (currently always zero)
- Previous offset
- Latest offset
The previous and latest offsets point to null-terminated strings in the section. The offsets are relative to the end of the version field (so four bytes after the start of the section).
The previous and latest strings are CSV-formatted revocation data
that can be parsed with RevocationSbat::parse.
Implementations§
Source§impl<'a> RevocationSection<'a>
impl<'a> RevocationSection<'a>
Sourcepub fn parse(
data: &'a [u8],
) -> Result<RevocationSection<'a>, RevocationSectionError>
pub fn parse( data: &'a [u8], ) -> Result<RevocationSection<'a>, RevocationSectionError>
Parse RevocationSection from raw data.
Typically this data is read from the .sbatlevel section of a
shim executable.
Sourcepub fn previous(&self) -> &[u8] ⓘ
pub fn previous(&self) -> &[u8] ⓘ
Get the raw previous revocation data.
This data be parsed with RevocationSbat::parse.
Sourcepub fn latest(&self) -> &[u8] ⓘ
pub fn latest(&self) -> &[u8] ⓘ
Get the raw latest revocation data.
This data be parsed with RevocationSbat::parse.
Trait Implementations§
Source§impl<'a> Clone for RevocationSection<'a>
impl<'a> Clone for RevocationSection<'a>
Source§fn clone(&self) -> RevocationSection<'a>
fn clone(&self) -> RevocationSection<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more