load all measurements from processor

This commit is contained in:
Noor 2024-10-09 13:46:08 +00:00 committed by Valentyn Faychuk
parent 4965623849
commit e4f0a6b8e3

@ -103,6 +103,17 @@ impl InstanceMeasurement {
}
}
pub fn load_all_measurements_from_processor() -> Result<Self, RaTlsError> {
let quote = Self::generate_static_empty_quote()?;
Ok(Self {
mrsigners: Some(vec![quote.mrsigner().into()]),
mrenclaves: Some(vec![quote.mrenclave().into()]),
product_ids: Some(vec![quote.product_id()]),
versions: Some(vec![quote.version()]),
})
}
fn generate_static_empty_quote() -> Result<&'static Quote, RaTlsError> {
Ok(STATIC_QUOTE.as_ref().map_err(|e| e.clone())?)
}