Move PCR indices for owner ID and cluster ID

This commit is contained in:
Malte Poll 2022-10-13 12:34:32 +02:00 committed by Malte Poll
parent a901759725
commit 3b6ee703f5
5 changed files with 40 additions and 13 deletions

View file

@ -208,6 +208,17 @@ func TestValidatorUpdateInitPCRs(t *testing.T) {
10: zero,
11: zero,
12: zero,
13: zero,
14: zero,
15: zero,
16: zero,
17: one,
18: one,
19: one,
20: one,
21: one,
22: one,
23: zero,
}
}
@ -298,7 +309,11 @@ func TestValidatorUpdateInitPCRs(t *testing.T) {
assert.Equal(pcrZeroUpdatedOne[:], pcr)
default:
assert.Equal(zero, validators.pcrs[uint32(i)])
if i >= 17 && i <= 22 {
assert.Equal(one, validators.pcrs[uint32(i)])
} else {
assert.Equal(zero, validators.pcrs[uint32(i)])
}
}
}
})