pvmfw: Move instance_hash in dice::PartialInputs
Simplify data dependencies, for simpler code flow.
Note: No functional change intended.
Test: m pvmfw libpvmfw.dice.test
Change-Id: I210dee0088cfdfdd7090316d8bad033c0082173a
diff --git a/guest/pvmfw/src/rollback.rs b/guest/pvmfw/src/rollback.rs
index e51b6d5..c2848a2 100644
--- a/guest/pvmfw/src/rollback.rs
+++ b/guest/pvmfw/src/rollback.rs
@@ -42,8 +42,8 @@
verified_boot_data: &VerifiedBootData,
dice_inputs: &PartialInputs,
cdi_seal: &[u8],
- instance_hash: Option<Hidden>,
) -> Result<(bool, Hidden, bool), RebootReason> {
+ let instance_hash = dice_inputs.instance_hash;
if let Some(fixed) = get_fixed_rollback_protection(verified_boot_data) {
// Prevent attackers from impersonating well-known images.
perform_fixed_index_rollback_protection(verified_boot_data, fixed)?;