Documentation
¶
Overview ¶
Package coscel contains the COS TLV event type and related functions.
Index ¶
Constants ¶
const ( // CELRType indicates the CELR event is a COS content // TODO: the value needs to be reserved in the CEL spec CELRType uint8 = 80 // EventPCRIndex is the PCR which should be used for CosEventType events. EventPCRIndex = 13 // EventRTMRIndex is the RTMR to be extended for COS events // According to https://uefi.org/specs/UEFI/2.10/38_Confidential_Computing.html // CCELMRIndex TDX Register // 0 MRTD // 1 RTMR[0] // 2 RTMR[1] // 3 RTMR[2] // So: // 4 RTMR[3] EventRTMRIndex = 3 // COSCCELMRIndex is the CCMR index to use in eventlog for COS events. COSCCELMRIndex = 4 )
Variables ¶
This section is empty.
Functions ¶
func FormatEnvVar ¶
FormatEnvVar takes in an environment variable name and its value, run some checks. Concats the name and value by '=' and returns it if valid; returns an error if the name or value is invalid.
Types ¶
type COSTLV ¶
type COSTLV struct { EventType ContentType EventContent []byte }
COSTLV is a specific event type created for the COS (Google Container-Optimized OS), used as a CEL content.
func ParseToCOSTLV ¶
ParseToCOSTLV constructs a CosTlv from t. It will check for the correct COS event type, and unmarshal the nested event.
func (COSTLV) GenerateDigest ¶
GenerateDigest generates the digest for the given COS TLV. The whole TLV struct will be marshaled to bytes and feed into the hash algo.
type ContentType ¶
type ContentType uint8
ContentType represent a COS content type in a CEL record content.
const ( ImageRefType ContentType = iota ImageDigestType RestartPolicyType ImageIDType ArgType EnvVarType OverrideArgType OverrideEnvType LaunchSeparatorType MemoryMonitorType )
Type for COS nested events