resources

package
v0.0.0-...-70d8f92 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//The location of CCEL table
	CCEL_FILE_LOCATION = "/sys/firmware/acpi/tables/CCEL"
	CCEL_DATA_LOCATION = "/sys/firmware/acpi/tables/data/CCEL"
	//The location of mounted CCEL table
	CCEL_FILE_MOUNT_LOCATION = "/run/firmware/acpi/tables/CCEL"
	CCEL_DATA_MOUNT_LOCATION = "/run/firmware/acpi/tables/data/CCEL"

	EVENT_TYPE_EV_NO_ACTION = 0x3
)
View Source
const (
	//The location of CCEL table
	TPM_EVENT_LOG_LOCATION = "/sys/kernel/security/tpm0/binary_bios_measurements"

	CHUNK_SIZE = 16384
)

Variables

View Source
var (
	TdxGetEventlogErr     = pkgerrors.New("Failed to get eventlog in CCEL table.")
	CcelTableNotFoundErr  = pkgerrors.New("CCEL table not found.")
	InvalidCcelTableErr   = pkgerrors.New("CCEL table with invalid data")
	FetchCcelTableAttrErr = pkgerrors.New("Failed to get the base address of CCEL table")
)
View Source
var (
	TpmGetEventlogErr      = pkgerrors.New("Failed to get eventlog in TPM.")
	TpmEventlogNotFoundErr = pkgerrors.New("TPM eventlog not found.")
)

Functions

func GetTdxEventlog

func GetTdxEventlog(start_position int, count int) (string, error)

func GetTpmEventlog

func GetTpmEventlog(start_position int, length int) (string, error)

Types

type TDEventLog

type TDEventLog struct {
	Rtmr        uint32
	Etype       uint32
	DigestCount uint32
	Digests     []string
	Data        []byte
	Event       []byte
	Length      int
	EventSize   uint32
	AlgorithmId uint16
}

type TDEventLogSpecIdHeader

type TDEventLogSpecIdHeader struct {
	Address     uint64
	Length      int
	HeaderData  []byte
	Rtmr        uint32
	Etype       uint32
	DigestCount uint32
	DigestSizes map[uint16]uint16
}

type TDEventLogs

type TDEventLogs struct {
	Header    TDEventLogSpecIdHeader
	EventLogs []TDEventLog
}

Jump to

Keyboard shortcuts

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