manifest

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HexString

type HexString string

HexString is a hex encoded string.

func NewHexString

func NewHexString(b []byte) HexString

NewHexString creates a new HexString from a byte slice.

func (HexString) Bytes

func (h HexString) Bytes() ([]byte, error)

Bytes returns the byte slice representation of the HexString.

func (HexString) String

func (h HexString) String() string

String returns the string representation of the HexString.

type HexStrings

type HexStrings []HexString

HexStrings is a slice of HexString.

func (*HexStrings) ByteSlices

func (l *HexStrings) ByteSlices() ([][]byte, error)

ByteSlices returns the byte slice representation of the HexStrings.

type Manifest

type Manifest struct {
	// policyHash/HOSTDATA -> commonName
	Policies                map[HexString][]string
	ReferenceValues         ReferenceValues
	WorkloadOwnerKeyDigests []HexString
}

Manifest is the Coordinator manifest and contains the reference values of the deployment.

func Default

func Default() Manifest

Default returns a default manifest.

type Policy

type Policy []byte

Policy is a CocCo execution policy.

func NewPolicyFromAnnotation

func NewPolicyFromAnnotation(annotation []byte) (Policy, error)

NewPolicyFromAnnotation parses a base64 encoded policy from an annotation.

func (Policy) Bytes

func (p Policy) Bytes() []byte

Bytes returns the policy as byte slice.

func (Policy) Hash

func (p Policy) Hash() HexString

Hash returns the hash of the policy.

type ReferenceValues

type ReferenceValues struct {
	SNP SNPReferenceValues
	// TrustedMeasurement is the hash of the trusted launch digest.
	TrustedMeasurement HexString
}

ReferenceValues contains the workload independent reference values.

type SNPReferenceValues

type SNPReferenceValues struct {
	MinimumTCB SNPTCB
}

SNPReferenceValues contains reference values for the SNP report.

type SNPTCB

type SNPTCB struct {
	BootloaderVersion SVN
	TEEVersion        SVN
	SNPVersion        SVN
	MicrocodeVersion  SVN
}

SNPTCB represents a set of SNP TCB values.

type SVN

type SVN uint8

SVN is a SNP secure version number.

func (SVN) MarshalJSON

func (s SVN) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SVN to JSON.

func (SVN) UInt8

func (s SVN) UInt8() uint8

UInt8 returns the uint8 value of the SVN.

func (*SVN) UnmarshalJSON

func (s *SVN) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the SVN from a JSON.

Jump to

Keyboard shortcuts

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