Documentation
¶
Overview ¶
Package client provides the library functions to get a TDX quote from the TDX guest device
Package client provides an interface to the Intel TDX guest device commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetQuote ¶
GetQuote uses Quote provider or Device(deprecated) to get the quote in byte array and convert it into proto. Supported quote formats - QuoteV4.
func GetRawQuote ¶
GetRawQuote uses Quote provider or Device(deprecated) to get the quote in byte array.
func UseDefaultTdxGuestDevice ¶
func UseDefaultTdxGuestDevice() bool
UseDefaultTdxGuestDevice returns true if tdxGuestPath=default.
Types ¶
type Device ¶
type Device interface { Open(path string) error Close() error Ioctl(command uintptr, argument any) (uintptr, error) }
Device encapsulates the possible commands to the TDX guest device. Deprecated: The Device interface is deprecated, and use of quote provider interface is recommended for fetching attestation quote.
type LinuxConfigFsQuoteProvider ¶ added in v0.3.0
type LinuxConfigFsQuoteProvider struct{}
LinuxConfigFsQuoteProvider implements the QuoteProvider interface to fetch attestation quote via ConfigFS.
func GetQuoteProvider ¶ added in v0.3.0
func GetQuoteProvider() (*LinuxConfigFsQuoteProvider, error)
GetQuoteProvider returns an instance of LinuxConfigFsQuoteProvider.
func (*LinuxConfigFsQuoteProvider) GetRawQuote ¶ added in v0.3.0
func (p *LinuxConfigFsQuoteProvider) GetRawQuote(reportData [64]byte) ([]uint8, error)
GetRawQuote returns byte format attestation quote via ConfigFS.
func (*LinuxConfigFsQuoteProvider) IsSupported ¶ added in v0.3.0
func (p *LinuxConfigFsQuoteProvider) IsSupported() error
IsSupported checks if TSM client can be created to use ConfigFS system.
type LinuxDevice ¶
type LinuxDevice struct {
// contains filtered or unexported fields
}
LinuxDevice implements the Device interface with Linux ioctls.
func (*LinuxDevice) Ioctl ¶
func (d *LinuxDevice) Ioctl(command uintptr, req any) (uintptr, error)
Ioctl sends a command with its wrapped request and response values to the Linux device.
func (*LinuxDevice) Open ¶
func (d *LinuxDevice) Open(path string) error
Open opens the TDX guest device from a given path