tpmeventlog

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tpmeventlog implements event log parsing and replay for the PC Client TPM PCR_based event log. It supports both the SHA-1 only and crypto agile log formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFirmwareLogState

func ExtractFirmwareLogState(rawEventLog []byte, pcrBank register.PCRBank, opts ExtractOpts) (*pb.FirmwareLogState, error)

ExtractFirmwareLogState parses a PC Client event log and replays the parsed event log against the PCR bank specified by hash.

It returns the corresponding FirmwareLogState containing the events verified by particular PCR indexes/digests. It returns an error on failing to replay the events against the PCR bank or on failing to parse malformed events.

The returned FirmwareLogState may be a partial FirmwareLogState. In the case of a partially filled state, err will be non-nil. Callers can look for individual errors using `errors.Is`.

It is the caller's responsibility to ensure that the passed PCR values can be trusted. Users can establish trust in PCR values by either calling client.ReadPCRs() themselves or by verifying the values via a PCR quote.

Types

type ExtractOpts

type ExtractOpts struct {
	Loader common.Bootloader
}

ExtractOpts gives options for extracting information from an event log.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL