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.