Documentation ¶
Index ¶
Constants ¶
const ( EV_PqREBOOT_CERT = EventType(0x00000000) EV_POST_CODE = EventType(0x00000001) EV_UNUSED = EventType(0x00000002) EV_NO_ACTION = EventType(0x00000003) EV_SEPARATOR = EventType(0x00000004) EV_ACTION = EventType(0x00000005) EV_EVENT_TAG = EventType(0x00000006) EV_S_CRTM_CONTENTS = EventType(0x00000007) EV_S_CRTM_VERSION = EventType(0x00000008) EV_CPU_MICROCODE = EventType(0x00000009) EV_PLATFORM_CONFIG_FLAGS = EventType(0x0000000A) EV_TABLE_OF_DEVICES = EventType(0x0000000B) EV_COMPACT_HASH = EventType(0x0000000C) EV_IPL = EventType(0x0000000D) EV_IPL_PARTITION_DATA = EventType(0x0000000E) EV_NONHOST_CODE = EventType(0x0000000F) EV_NONHOST_CONFIG = EventType(0x00000010) EV_NONHOST_INFO = EventType(0x00000011) EV_OMIT_BOOT_DEVICE_EVENTS = EventType(0x00000012) EV_EFI_EVENT_BASE = EventType(0x80000000) EV_EFI_VARIABLE_DRIVER_CONFIG = EventType(0x80000001) EV_EFI_VARIABLE_BOOT = EventType(0x80000002) EV_EFI_BOOT_SERVICES_APPLICATION = EventType(0x80000003) EV_EFI_BOOT_SERVICES_DRIVER = EventType(0x80000004) EV_EFI_RUNTIME_SERVICES_DRIVER = EventType(0x80000005) EV_EFI_GPT_EVENT = EventType(0x80000006) EV_EFI_ACTION = EventType(0x80000007) EV_EFI_PLATFORM_FIRMWARE_BLOB = EventType(0x80000008) EV_EFI_HANDOFF_TABLES = EventType(0x80000009) EV_EFI_HCRTM_EVENT = EventType(0x80000010) EV_EFI_VARIABLE_AUTHORITY = EventType(0x800000E0) )
The list of available EventLog entry types.
const ( // TPMAlgorithmSHA1 is the identified of SHA1 algorithm. TPMAlgorithmSHA1 = tpm2.AlgSHA1 // TPMAlgorithmSHA256 is the identified of SHA256 algorithm. TPMAlgorithmSHA256 = tpm2.AlgSHA256 )
Variables ¶
This section is empty.
Functions ¶
func ParseLocality ¶
ParseLocality parses TPM locality from EV_NO_ACTION event corresponding to the TPM initialization.
Types ¶
type Digest ¶
type Digest struct { HashAlgo TPMAlgorithm Digest []byte }
Digest is the digest reported by an Event.
type ErrInvalidDigestLength ¶
ErrInvalidDigestLength means an event has a digest of a size not appropriate for a selected hash algorithm.
func (ErrInvalidDigestLength) Error ¶
func (err ErrInvalidDigestLength) Error() string
Error implements interface `error`.
type ErrLocality ¶
type ErrLocality struct {
EventData []byte
}
ErrLocality means it was unable to detect the locality to initialize the PCR0 value.
func (ErrLocality) Error ¶
func (err ErrLocality) Error() string
Error implements interface `error`.
type ErrNotSupportedHashAlgo ¶
type ErrNotSupportedHashAlgo struct {
TPMAlgo TPMAlgorithm
}
ErrNotSupportedHashAlgo means selected hash algorithm is not supported (yet?)
func (ErrNotSupportedHashAlgo) Error ¶
func (err ErrNotSupportedHashAlgo) Error() string
Error implements interface `error`.
type TPMAlgorithm ¶
TPMAlgorithm is an identified of a TPM-supported hash algorithm.
See also: https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-2-Structures-01.38.pdf#page=42
type TPMEventLog ¶
type TPMEventLog struct {
Events []*Event
}
TPMEventLog is a parsed EventLog.
func (*TPMEventLog) FilterEvents ¶
func (eventLog *TPMEventLog) FilterEvents(pcrIndex pcr.ID, hashAlgo TPMAlgorithm) ([]*Event, error)
FilterEvents returns only the events which has a specified PCR index and a digest of a specified hash algorithm.