pub struct WitnessLog { /* private fields */ }Expand description
Witness log for boot and runtime attestation.
The witness log is append-only and hash-chained for integrity.
Implementations§
Source§impl WitnessLog
impl WitnessLog
Sourcepub fn new(config: WitnessLogConfig) -> Self
pub fn new(config: WitnessLogConfig) -> Self
Creates a new witness log.
Sourcepub fn entry_count(&self) -> u64
pub fn entry_count(&self) -> u64
Returns the current entry count.
Sourcepub fn size_bytes(&self) -> u64
pub fn size_bytes(&self) -> u64
Returns the current size in bytes.
Sourcepub fn append_boot_attestation(
&mut self,
attestation: &BootAttestation,
) -> Result<(), KernelError>
pub fn append_boot_attestation( &mut self, attestation: &BootAttestation, ) -> Result<(), KernelError>
Appends a boot attestation entry.
This should be the first entry in the witness log.
Sourcepub fn append_proof_attestation(
&mut self,
attestation: &ProofAttestation,
) -> Result<(), KernelError>
pub fn append_proof_attestation( &mut self, attestation: &ProofAttestation, ) -> Result<(), KernelError>
Appends a proof attestation entry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WitnessLog
impl RefUnwindSafe for WitnessLog
impl Send for WitnessLog
impl Sync for WitnessLog
impl Unpin for WitnessLog
impl UnsafeUnpin for WitnessLog
impl UnwindSafe for WitnessLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more