Skip to content

Commit 80f1a67

Browse files
committed
fix(chore): Fix for z17 Lpar
This fix is needed to generate correct ibmse-policy.rego for the z17 lpars
1 parent efafaca commit 80f1a67

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/rvps-extraction/GetRvps.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,15 @@ do
137137
se_tag=$(python3 $PWD/static-files/se_parse_hdr.py $PWD/output-files/hdr.bin $PWD/static-files/HKD.crt | grep se.tag | awk -F ":" '{ print $2 }')
138138
se_image_phkh=$(python3 $PWD/static-files/se_parse_hdr.py $PWD/output-files/hdr.bin $PWD/static-files/HKD.crt | grep se.image_phkh | awk -F ":" '{ print $2 }')
139139

140+
# copy attestation phkh if image phkh is unavailable ex. with machine specific HKD
141+
if [ -z "${se_image_phkh}" ]; then
142+
se_image_phkh=$(python3 $PWD/static-files/se_parse_hdr.py $PWD/output-files/hdr.bin $PWD/static-files/HKD.crt | grep se.attestation_phkh | awk -F ":" '{ print $2 }')
143+
fi
144+
140145
echo "se.tag: $se_tag"
141146
echo "se.image_phkh: $se_image_phkh"
142147

148+
143149
generate_policy_files $se_tag $se_image_phkh
144150

145151
provenance=$(cat $PWD/output-files/se-sample | base64 --wrap=0)
@@ -185,6 +191,11 @@ EOF
185191
se_tag=$(python3 $PWD/static-files/se_parse_hdr.py $PWD/output-files/hdr.bin $PWD/static-files/HKD.crt | grep se.tag | awk -F ":" '{ print $2 }')
186192
se_image_phkh=$(python3 $PWD/static-files/se_parse_hdr.py $PWD/output-files/hdr.bin $PWD/static-files/HKD.crt | grep se.image_phkh | awk -F ":" '{ print $2 }')
187193

194+
# copy attestation phkh if image phkh is unavailable ex. with machine specific HKD
195+
if [ -z "${se_image_phkh}" ]; then
196+
se_image_phkh=$(python3 $PWD/static-files/se_parse_hdr.py $PWD/output-files/hdr.bin $PWD/static-files/HKD.crt | grep se.attestation_phkh | awk -F ":" '{ print $2 }')
197+
fi
198+
188199
echo "se.tag: $se_tag"
189200
echo "se.image_phkh: $se_image_phkh"
190201

0 commit comments

Comments
 (0)