tdx

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDcapTDXAttestationMeasurementsRaw

func ParseDcapTDXAttestationMeasurementsRaw(attDocRaw []byte) (map[uint32][]byte, error)

func SetLogDcapQuote

func SetLogDcapQuote(logQuote bool)

Types

type Issuer

type Issuer struct {
	variant.QEMUTDX
	// contains filtered or unexported fields
}

Issuer is the TDX attestation issuer.

func NewIssuer

func NewIssuer(log attestation.Logger) *Issuer

NewIssuer initializes a new TDX Issuer.

func (*Issuer) Issue

func (i *Issuer) Issue(_ context.Context, userData []byte, nonce []byte) (attDoc []byte, err error)

Issue issues a TDX attestation document.

type RemoteIssuer added in v0.1.8

type RemoteIssuer struct {
	variant.QEMUTDX
	// contains filtered or unexported fields
}

RemoteIssuer is a TDX attestation issuer that uses a remote quote provider service

func NewRemoteIssuer added in v0.1.8

func NewRemoteIssuer(config *RemoteQuoteProviderConfig, log attestation.Logger) *RemoteIssuer

NewRemoteIssuer initializes a new TDX Issuer that uses a remote quote provider

func (*RemoteIssuer) Issue added in v0.1.8

func (i *RemoteIssuer) Issue(ctx context.Context, userData []byte, nonce []byte) (attDoc []byte, err error)

Issue issues a TDX attestation document using the remote quote provider

type RemoteQuoteProviderConfig added in v0.1.8

type RemoteQuoteProviderConfig struct {
	// BaseURL is the base URL of the remote TDX quote provider service
	BaseURL string

	// HTTPClient is the HTTP client used to communicate with the remote service
	HTTPClient *http.Client

	// Timeout is the maximum duration to wait for a response from the remote service
	Timeout time.Duration
}

RemoteQuoteProviderConfig holds configuration for the remote TDX quote provider

func DefaultRemoteQuoteProviderConfig added in v0.1.8

func DefaultRemoteQuoteProviderConfig(url string) *RemoteQuoteProviderConfig

DefaultRemoteQuoteProviderConfig returns a default configuration for the remote TDX quote provider

type Validator

type Validator struct {
	variant.QEMUTDX
	// contains filtered or unexported fields
}

Validator is the TDX attestation validator.

func NewValidator

func NewValidator(cfg *config.QEMUTDX, log attestation.Logger) *Validator

NewValidator initializes a new TDX Validator.

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context, attDocRaw []byte, nonce []byte) (userData []byte, err error)

Validate validates the given attestation document using TDX attestation.

Jump to

Keyboard shortcuts

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