From 19ec3be6bd70e737e5dc8d493b355a9f473bbe0b Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Sat, 10 Dec 2022 14:52:42 +0100 Subject: [PATCH] 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. --- internal/manifest/coreos_installer.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/manifest/coreos_installer.go b/internal/manifest/coreos_installer.go index b0356176b6..fed41d993d 100644 --- a/internal/manifest/coreos_installer.go +++ b/internal/manifest/coreos_installer.go @@ -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")