Skip to content

Commit 2506627

Browse files
author
CKI KWF Bot
committed
Merge: redhat: use the same cert as UKI's to sign addons
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1658 JIRA: https://issues.redhat.com/browse/RHEL-124088 Addons' cert should be the same as UKI's. Otherwise it breaks full disk encryption of Azure CVM by changing PCR7 where volume key is sealed. Signed-off-by: Li Tian <litian@redhat.com> Approved-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 7860301 + d0574a2 commit 2506627

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

redhat/kernel.spec.template

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2800,6 +2800,11 @@ BuildKernel() {
28002800
%endif
28012801

28022802
%pesign -s -i $KernelUnifiedImage -o $KernelUnifiedImage.signed -a %{secureboot_ca_0} -c $UKI_secureboot_cert -n $UKI_secureboot_name
2803+
for addon in "$KernelAddonsDirOut"/*; do
2804+
%pesign -s -i $addon -o $addon.signed -a %{secureboot_ca_0} -c $UKI_secureboot_cert -n $UKI_secureboot_name
2805+
rm -f $addon
2806+
mv $addon.signed $addon
2807+
done
28032808
# 0%{?fedora}%{?eln}
28042809
%endif
28052810
if [ ! -s $KernelUnifiedImage.signed ]; then
@@ -2808,12 +2813,6 @@ BuildKernel() {
28082813
fi
28092814
mv $KernelUnifiedImage.signed $KernelUnifiedImage
28102815

2811-
for addon in "$KernelAddonsDirOut"/*; do
2812-
%pesign -s -i $addon -o $addon.signed -a %{secureboot_ca_0} -c %{secureboot_key_0} -n %{pesign_name_0}
2813-
rm -f $addon
2814-
mv $addon.signed $addon
2815-
done
2816-
28172816
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer
28182817
cp -a $UKI_secureboot_cert $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/secureboot-uki-%{_arch}.cer
28192818

0 commit comments

Comments
 (0)