tdx

package
v0.0.0-...-862206e Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_ACPI_TABLE_FILE      = "/sys/firmware/acpi/tables/CCEL"
	DEFAULT_ACPI_TABLE_DATA_FILE = "/sys/firmware/acpi/tables/data/CCEL"
)

Variables

This section is empty.

Functions

func TdxVMInitFunc

TdxVMInitFunc creates and inits a tdx confidential VM

Types

type QuoteHandler

type QuoteHandler interface {
	// Quote gets the quote of the td vm, which is refered as cc report
	Quote([tdx.TD_REPORT_LEN]byte) ([]byte, error)
	// TdReport gets the td report of the td vm, where nonce ad userData
	// are encoded in base64
	TdReport(nonce, userData string) ([tdx.TD_REPORT_LEN]byte, error)
}

func GetQuoteHandler

func GetQuoteHandler(spec tdx.TDXDeviceSpec) (QuoteHandler, error)

type QuoteHandler15

type QuoteHandler15 struct {
	// contains filtered or unexported fields
}

func (*QuoteHandler15) FetchQuoteByTdvmcall

func (q *QuoteHandler15) FetchQuoteByTdvmcall(tdreport [tdx.TD_REPORT_LEN]byte) ([]byte, error)

func (*QuoteHandler15) FetchQuoteByVsock

func (q *QuoteHandler15) FetchQuoteByVsock(vsockPort int, tdreport [tdx.TD_REPORT_LEN]byte) ([]byte, error)

func (*QuoteHandler15) Quote

func (q *QuoteHandler15) Quote(tdreport [tdx.TD_REPORT_LEN]byte) ([]byte, error)

Quote implements QuoteHandler.

func (*QuoteHandler15) TdReport

func (q *QuoteHandler15) TdReport(nonce, userData string) ([tdx.TD_REPORT_LEN]byte, error)

TdReport implements QuoteHandler.

type TDXDevice

type TDXDevice struct {
	cctrusted_vm.GenericDevice
	QuoteHandler
	// contains filtered or unexported fields
}

func (*TDXDevice) CCType

func (t *TDXDevice) CCType() evidence_api.CC_Type

CCType implements cctrusted_vm.Device.

func (*TDXDevice) Name

func (t *TDXDevice) Name() string

Name implements cctrusted_vm.Device.

func (*TDXDevice) ProbeDevice

func (t *TDXDevice) ProbeDevice() error

ProbeDevice implements cctrusted_vm.Device, probe valid tdx device.

func (*TDXDevice) Report

func (t *TDXDevice) Report(nonce, userData string, extraArgs map[string]any) (evidence_api.CcReport, error)

Report implements cctrusted_vm.Device, get CC report

func (*TDXDevice) Version

func (t *TDXDevice) Version() evidence_api.DeviceVersion

Version implements cctrusted_vm.Device.

type TDXEventLogRecorder

type TDXEventLogRecorder struct {
	// contains filtered or unexported fields
}

func (*TDXEventLogRecorder) FullEventLog

func (t *TDXEventLogRecorder) FullEventLog() ([]byte, error)

FullEventLog implements cctrusted_vm.EventRecorder.

func (*TDXEventLogRecorder) ProbeRecorder

func (t *TDXEventLogRecorder) ProbeRecorder() error

ProbeRecorder implements cctrusted_vm.EventRecorder.

func (*TDXEventLogRecorder) RedirectAcpiTableDataFile

func (t *TDXEventLogRecorder) RedirectAcpiTableDataFile(file string)

func (*TDXEventLogRecorder) RedirectAcpiTableFile

func (t *TDXEventLogRecorder) RedirectAcpiTableFile(file string)

type TdxVM

func NewTdxVM

func NewTdxVM(args *cctrusted_vm.CVMInitArgs) *TdxVM

func (*TdxVM) CVMContext

func (t *TdxVM) CVMContext() cctrusted_vm.CVMContext

CVMContext implements cctrusted_vm.ConfidentialVM.

func (*TdxVM) DefaultAlgorithm

func (t *TdxVM) DefaultAlgorithm() evidence_api.TCG_ALG

DefaultAlgorithm implements cctrusted_vm.ConfidentialVM.

func (*TdxVM) MaxImrIndex

func (t *TdxVM) MaxImrIndex() int

MaxImrIndex implements cctrusted_vm.ConfidentialVM.

func (*TdxVM) Probe

func (t *TdxVM) Probe() error

Probe implements cctrusted_vm.ConfidentialVM, probing tdx device, eventlog and ima

Jump to

Keyboard shortcuts

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