vmsdk

package module
v0.0.0-...-299fd3a Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TSM_PREFIX = "/sys/kernel/config/tsm/report"
)

Variables

This section is empty.

Functions

func RegisterCVMInitFunc

func RegisterCVMInitFunc(fn CVMInitFunc)

Types

type CVMContext

type CVMContext struct {
	VMType  evidence_api.CC_Type
	Version evidence_api.DeviceVersion
}

type CVMInitArgs

type CVMInitArgs struct {
	// RedirectedAcpiTableFile is the alternative
	// of the original `DEFAULT_ACPI_TABLE_FILE`, if which
	// can not be accessed
	RedirectedAcpiTableFile string
	// RedirectedAcpiTableDataFile is the alternative
	// of the original `DEFAULT_ACPI_TABLE_DATA_FILE`, if which
	// can not be accessed
	RedirectedAcpiTableDataFile string
}

type CVMInitFunc

type CVMInitFunc func(*CVMInitArgs) (ConfidentialVM, error)

type ConfidentialVM

type ConfidentialVM interface {
	Probe() error
	CVMContext() CVMContext
	MaxImrIndex() int
	DefaultAlgorithm() evidence_api.TCG_ALG
	Device
	EventRecorder
	evidence_api.IMARecorder
}

func GetCVMInstance

func GetCVMInstance(args *CVMInitArgs) (ConfidentialVM, error)

type Device

type Device interface {
	ProbeDevice() error
	Report(nonce, userData []byte, extraArgs map[string]any) (evidence_api.CcReport, error)
	Name() string
	CCType() evidence_api.CC_Type
	Version() evidence_api.DeviceVersion
}

type EventRecorder

type EventRecorder interface {
	ProbeRecorder() error
	FullEventLog() ([]byte, error)
}

type GenericDevice

type GenericDevice struct {
	Device
}

func (*GenericDevice) Report

func (d *GenericDevice) Report(nonce, userData []byte, extraArgs map[string]any) (evidence_api.CcReport, error)

Directories

Path Synopsis
cmd
app

Jump to

Keyboard shortcuts

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