Skip to content

Commit c8a6671

Browse files
author
vlad
committed
printing self report paramts during attestation (not only trace)
1 parent 5e162db commit c8a6671

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

cosmwasm/enclaves/execute/src/registration/attestation.rs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ use super::ocalls::{
7474
#[cfg(feature = "SGX_MODE_HW")]
7575
use super::{hex, report::EndorsedAttestationReport};
7676

77+
use ::hex as orig_hex;
78+
7779
#[cfg(feature = "SGX_MODE_HW")]
7880
pub const DEV_HOSTNAME: &str = "api.trustedservices.intel.com";
7981

@@ -409,9 +411,15 @@ pub fn verify_quote_ecdsa(
409411
let my_p_quote = vec_quote.as_ptr() as *const sgx_quote_t;
410412
let report_body = unsafe { (*my_p_quote).report_body };
411413

412-
trace!("body.mr_signer = {:?}", report_body.mr_signer.m);
413-
trace!("body.mr_enclave = {:?}", report_body.mr_enclave.m);
414-
trace!("body.report_data = {:?}", report_body.report_data.d);
414+
// trace!(
415+
// "body.mr_signer = {}",
416+
// orig_hex::encode(&report_body.mr_signer.m)
417+
// );
418+
// trace!(
419+
// "body.mr_enclave = {}",
420+
// orig_hex::encode(&report_body.mr_enclave.m)
421+
// );
422+
// trace!("body.report_data = {}", orig_hex::encode(&report_body.report_data.d));
415423

416424
Ok((report_body, qv_result))
417425
}
@@ -527,6 +535,19 @@ pub fn get_quote_ecdsa_untested(pub_k: &[u8]) -> Result<(Vec<u8>, Vec<u8>), sgx_
527535
}
528536
}
529537

538+
println!(
539+
"mr_signer = {}",
540+
orig_hex::encode(&my_report.body.mr_signer.m)
541+
);
542+
println!(
543+
"mr_enclave = {}",
544+
orig_hex::encode(&my_report.body.mr_enclave.m)
545+
);
546+
println!(
547+
"report_data = {}",
548+
orig_hex::encode(&my_report.body.report_data.d)
549+
);
550+
530551
Ok((vec_quote, vec_coll))
531552
}
532553

0 commit comments

Comments
 (0)