Documentation ¶
Index ¶
- func Authentihash(r io.Reader, h crypto.Hash) ([]byte, error)
- func DescribeBootStages(w io.Writer, bootStages []EFIBootStage) error
- func DescribeLinuxLoad2(w io.Writer, cmdline []byte, initrdDigest [32]byte) error
- func DescribeUKISections(w io.Writer, ukiSections []pesection.PESection) error
- func PredictPCR11(simulator *Simulator, ukiSections []pesection.PESection) error
- func PredictPCR4(simulator *Simulator, efiBootStages []EFIBootStage) error
- func PredictPCR9(simulator *Simulator, cmdline []byte, initrdDigest [32]byte) error
- type Digest256
- type EFIBootStage
- type Event
- type EventLog
- type PCR256
- type PCR256Bank
- type Simulator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authentihash ¶
Authentihash returns the PE/COFF hash / Authentihash of a file.
func DescribeBootStages ¶
func DescribeBootStages(w io.Writer, bootStages []EFIBootStage) error
DescribeBootStages prints a description of the EFIBootStages to a writer.
func DescribeLinuxLoad2 ¶
DescribeLinuxLoad2 describes the expected measurements for the Linux LOAD_FILE2 protocol.
func DescribeUKISections ¶
DescribeUKISections describes the expected measurements for the UKI sections.
func PredictPCR11 ¶
PredictPCR11 predicts the PCR11 value based on the components of unified kernel images.
func PredictPCR4 ¶
func PredictPCR4(simulator *Simulator, efiBootStages []EFIBootStage) error
PredictPCR4 predicts the PCR4 value based on the EFIBootStages.
Types ¶
type Digest256 ¶
type Digest256 [32]byte
Digest256 is a 256-bit digest value (sha256).
func (Digest256) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
type EFIBootStage ¶
EFIBootStage is a stage (bootloader) of the EFI boot process.
type Event ¶
type Event struct { PCRIndex uint32 Digest Digest256 Data []byte `json:",omitempty"` Description string }
Event is a pcr extend event.
type PCR256 ¶
type PCR256 [32]byte
PCR256 is a 256-bit PCR value.
func EVEFIActionPCR256 ¶
func EVEFIActionPCR256() PCR256
EVEFIActionPCR256 returns the expected PCR256 value for EV_EFI_ACTION.
func EVSeparatorPCR256 ¶
func EVSeparatorPCR256() PCR256
EVSeparatorPCR256 returns the expected PCR256 value for EV_SEPARATOR.
func (PCR256) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
type PCR256Bank ¶
PCR256Bank is a map of PCR index to PCR256 value.
type Simulator ¶
type Simulator struct { Bank PCR256Bank `json:"measurements"` EventLog EventLog }
Simulator is a TPM PCR simulator.
func NewDefaultSimulator ¶
func NewDefaultSimulator() *Simulator
NewDefaultSimulator returns a new Simulator with default PCR values.