In the attestation crate we represent measurement values for the different supported CC platforms like so:
pub enum MultiMeasurements {
Dcap(HashMap<DcapMeasurementRegister, [u8; 48]>),
Azure(HashMap<u32, [u8; 32]>),
NoAttestation,
}
By using a HashMap we allow representation of an incomplete set of measurements, and need to handle the case that some are missing.
For DCAP, switch the hashmap to a struct which must contain all measurement values.
The difficulty is when converting from the HTTP header format used by buildernet / attested-tls-proxy. We would need to change behavior to bail if an incomplete set of measurements is given. In practice this should not be the case.
In the
attestationcrate we represent measurement values for the different supported CC platforms like so:By using a
HashMapwe allow representation of an incomplete set of measurements, and need to handle the case that some are missing.For DCAP, switch the hashmap to a struct which must contain all measurement values.
The difficulty is when converting from the HTTP header format used by buildernet / attested-tls-proxy. We would need to change behavior to bail if an incomplete set of measurements is given. In practice this should not be the case.