From e4f0a6b8e32543c4919e393c932a615a2801458a Mon Sep 17 00:00:00 2001 From: Noor Date: Wed, 9 Oct 2024 13:46:08 +0000 Subject: [PATCH] load all measurements from processor --- src/config.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/config.rs b/src/config.rs index 9a84688..fb574cd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -103,6 +103,17 @@ impl InstanceMeasurement { } } + pub fn load_all_measurements_from_processor() -> Result { + 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())?) }