manifest: return inline FDO cert from CoreOSInstaller pipeline

The CoreOSInstaller pipeline supports adding inline data to the tree for
the FDO cert.  This needs to be returned by the pipeline object via the
getInline() method to attach the necessary data to the Sources array in
the manifest.
This commit is contained in:
Achilleas Koutsou 2022-12-10 14:52:42 +01:00 committed by Tom Gundersen
parent 351576f362
commit 19ec3be6bd

View file

@ -126,6 +126,14 @@ func (p *CoreOSInstaller) serializeStart(packages []rpmmd.PackageSpec) {
}
}
func (p *CoreOSInstaller) getInline() []string {
// inline data for FDO cert
if p.FDO != nil && p.FDO.DiunPubKeyRootCerts != "" {
return []string{p.FDO.DiunPubKeyRootCerts}
}
return []string{}
}
func (p *CoreOSInstaller) serializeEnd() {
if len(p.packageSpecs) == 0 {
panic("serializeEnd() call when serialization not in progress")