Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTPMALGorithm ¶ added in v0.2.0
func PhasesToString ¶ added in v0.2.0
PhasesToString returns a nice string for all the phases with semicolons between them
Types ¶
type BankData ¶
type BankData struct { // list of PCR banks PCRs []int `json:"pcrs"` // Public key of the TPM PKFP string `json:"pkfp"` // Policy digest Pol string `json:"pol"` // Signature of the policy digest in base64 Sig string `json:"sig"` }
BankData constains data for a specific PCR bank.
type PCRData ¶
type PCRData struct { SHA1 []BankData `json:"sha1,omitempty"` SHA256 []BankData `json:"sha256,omitempty"` SHA384 []BankData `json:"sha384,omitempty"` SHA512 []BankData `json:"sha512,omitempty"` }
PCRData is the data structure for PCR signature json.
type PhaseInfo ¶
PhaseInfo describes which phase extensions are signed/measured.
func OrderedPhases ¶
func OrderedPhases() []PhaseInfo
OrderedPhases returns the phases that are measured, in order.
Derived from https://github.com/systemd/systemd/blob/v253/src/boot/measure.c#L295-L308 ref: https://www.freedesktop.org/software/systemd/man/systemd-pcrphase.service.html#Description
This means that for each phase the values will be measured at that point, so we want to cover all points If you custom extend the PCR with your own phases, the this is useless I.E. You want to load something and then extend so its measured up to that point, then the values below do not work for you OrderedPhases returns the phases that are measured.
type UkiSection ¶ added in v0.2.0
type UkiSection struct { // Section name. Name constants.Section // Path to the contents of the section. Path string // Should the section be measured to the TPM? Measure bool // Should the section be appended, or is it already in the PE file. Append bool // Size & VMA of the section. Size uint64 VMA uint64 }
UkiSection is a UKI file section.