idkeydigest

package
v2.19.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package idkeydigest provides type definitions for the `idkeydigest` value of SEV-SNP attestation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcement added in v2.8.0

type Enforcement uint32

Enforcement defines the behavior of the validator when the ID key digest is not found in the expected list.

const (
	// Unknown is reserved for invalid configurations.
	Unknown Enforcement = iota
	// Equal will error if the reported signing key digest does not match any of the values in 'acceptedKeyDigests'.
	Equal
	// MAAFallback uses 'equal' checking for validation, but fallback to using Microsoft Azure Attestation (MAA)
	// for validation if the reported digest does not match any of the values in 'acceptedKeyDigests'.
	MAAFallback
	// WarnOnly is the same as 'equal', but only prints a warning instead of returning an error if no match is found.
	WarnOnly
)

func EnforcePolicyFromString added in v2.7.0

func EnforcePolicyFromString(s string) Enforcement

EnforcePolicyFromString returns Enforcement from string.

func (Enforcement) MarshalJSON added in v2.8.0

func (e Enforcement) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Enforcement) MarshalYAML added in v2.8.0

func (e Enforcement) MarshalYAML() (any, error)

MarshalYAML implements the yaml.Marshaler interface.

func (Enforcement) String added in v2.8.0

func (i Enforcement) String() string

func (*Enforcement) UnmarshalJSON added in v2.8.0

func (e *Enforcement) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Enforcement) UnmarshalYAML added in v2.8.0

func (e *Enforcement) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type List added in v2.8.0

type List [][]byte

List is a list of trusted digest values for the ID key.

func DefaultList added in v2.8.0

func DefaultList() List

DefaultList returns the default list of accepted ID key digests.

func NewList added in v2.8.0

func NewList(digests [][]byte) List

NewList creates a new IDKeyDigests from a list of digests.

func UnmarshalHexString added in v2.14.0

func UnmarshalHexString(encodedDigests []string) (List, error)

UnmarshalHexString unmarshals a list of hex encoded ID key digest strings.

func (List) EqualTo added in v2.8.0

func (d List) EqualTo(other List) bool

EqualTo returns true if the List of digests is equal to the other List.

func (List) MarshalJSON added in v2.8.0

func (d List) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (List) MarshalYAML added in v2.8.0

func (d List) MarshalYAML() (any, error)

MarshalYAML implements the yaml.Marshaler interface.

func (*List) UnmarshalJSON added in v2.8.0

func (d *List) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*List) UnmarshalYAML added in v2.8.0

func (d *List) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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