measurements: correctly override validation options

This commit is contained in:
Malte Poll 2024-01-23 11:05:43 +01:00
parent 2a7a9dc2aa
commit a2e2f0387c

View File

@ -119,6 +119,7 @@ func ApplyOverrides(in M, csp cloudprovider.Provider, attestationVariant string)
return nil, fmt.Errorf("missing measurement for PCR %d", i)
}
m.ValidationOpt = Enforce
out[i] = m
}
for _, i := range override.MustWarn {
m, ok := out[i]
@ -126,6 +127,7 @@ func ApplyOverrides(in M, csp cloudprovider.Provider, attestationVariant string)
return nil, fmt.Errorf("missing measurement for PCR %d", i)
}
m.ValidationOpt = WarnOnly
out[i] = m
}
}
return out, nil