From e140cc10d8977cb1873b2d6febc304337e60472a Mon Sep 17 00:00:00 2001 From: Paul Flynn Date: Thu, 2 Jan 2025 22:00:15 -0500 Subject: [PATCH] Enable metadata debugging in embedded policy handling Added print statements to log metadata buffer size, contents, and processed metadata during embedded policy handling. These changes improve visibility and aid in debugging metadata-related issues. --- src/bin/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index dfc7e94..f7e252d 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -523,8 +523,10 @@ async fn handle_rewrap( locator = policy.get_locator().clone(); } PolicyType::Embedded => { - // println!("embedded policy"); + println!("embedded policy"); if let Some(body) = &policy.body { + println!("Metadata buffer size: {}", body.len()); + println!("Metadata buffer contents: {:?}", body); metadata = match root_as_metadata(body) { Ok(metadata) => Some(metadata), Err(e) => { @@ -533,7 +535,7 @@ async fn handle_rewrap( } }; // TODO add contracts - // println!("metadata: {:#?}", metadata); + println!("metadata: {:#?}", metadata); } // add content rating contract let rl = ResourceLocator {