constants

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PEMTypeRSAPublic = "PUBLIC KEY"
	Name             = "Kairos"
	// UKIPCR is the PCR number where sections except `.pcrsig` are measured.
	UKIPCR            = 11
	OSReleaseTemplate = `NAME="{{ .Name }}"
ID={{ .ID }}
VERSION_ID={{ .Version }}
PRETTY_NAME="{{ .Name }} ({{ .Version }})"
)
`
	// EnterInitrd is the phase value extended to the PCR during the initrd.
	EnterInitrd Phase = "enter-initrd"
	LeaveInitrd Phase = "leave-initrd"
	SysInit     Phase = "sysinit"
	Ready       Phase = "ready"

	// List of well-known section names.
	Linux   Section = ".linux"
	OSRel   Section = ".osrel"
	CMDLine Section = ".cmdline"
	Initrd  Section = ".initrd"
	Splash  Section = ".splash"
	DTB     Section = ".dtb"
	Uname   Section = ".uname"
	SBAT    Section = ".sbat"
	PCRSig  Section = ".pcrsig"
	PCRPKey Section = ".pcrpkey"
)

Variables

This section is empty.

Functions

func OSReleaseFor

func OSReleaseFor(name, version string) ([]byte, error)

OSReleaseFor returns the contents of /etc/os-release for a given name and version.

Types

type Phase

type Phase string

Phase is the phase value extended to the PCR.

type Section

type Section string

Section is a name of a PE file section (UEFI binary).

func OrderedSections

func OrderedSections() []Section

OrderedSections returns the sections that are measured into PCR.

Derived from https://github.com/systemd/systemd/blob/main/src/fundamental/tpm-pcr.h#L23-L36 .pcrsig section is omitted here since that's what we are calulating here.

Jump to

Keyboard shortcuts

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