Closed liuw1 closed 2 years ago
Cannot create instances outside for some structs in tdx-tdcall/tdreport.rs. Since the element "resverd" is not public in these structs.
pub struct ReportMac { pub report_type: ReportType, reserved0: [u8; 12], pub cpu_svn: [u8; 16], pub tee_tcb_info_hash: [u8; 48], pub tee_info_hash: [u8; 48], pub report_data: [u8; 64], reserved1: [u8; 32], pub mac: [u8; 32], }
pub struct TeeTcbInfo { pub valid: [u8; 8], pub tee_tcb_svn: [u8; 16], pub mrseam: [u8; 48], pub mrsigner_seam: [u8; 48], pub attributes: [u8; 8], reserved: [u8; 111], }
pub struct TdInfo { pub attributes: [u8; 8], pub xfam: [u8; 8], pub mrtd: [u8; 48], pub mrconfig_id: [u8; 48], pub mrowner: [u8; 48], pub mrownerconfig: [u8; 48], pub rtmr0: [u8; 48], pub rtmr1: [u8; 48], pub rtmr2: [u8; 48], pub rtmr3: [u8; 48], reserved: [u8; 112], }
pub struct TdxReport { pub report_mac: ReportMac, pub tee_tcb_info: TeeTcbInfo, reserved: [u8; 17], pub td_info: TdInfo, }
If applicable, we may use #[derive(Default)] to solve this issue.
#[derive(Default)]
I will fix this issue.
It is not an real issue. So close it.
Cannot create instances outside for some structs in tdx-tdcall/tdreport.rs. Since the element "resverd" is not public in these structs.
pub struct ReportMac { pub report_type: ReportType, reserved0: [u8; 12], pub cpu_svn: [u8; 16], pub tee_tcb_info_hash: [u8; 48], pub tee_info_hash: [u8; 48], pub report_data: [u8; 64], reserved1: [u8; 32], pub mac: [u8; 32], }
pub struct TeeTcbInfo { pub valid: [u8; 8], pub tee_tcb_svn: [u8; 16], pub mrseam: [u8; 48], pub mrsigner_seam: [u8; 48], pub attributes: [u8; 8], reserved: [u8; 111], }
pub struct TdInfo { pub attributes: [u8; 8], pub xfam: [u8; 8], pub mrtd: [u8; 48], pub mrconfig_id: [u8; 48], pub mrowner: [u8; 48], pub mrownerconfig: [u8; 48], pub rtmr0: [u8; 48], pub rtmr1: [u8; 48], pub rtmr2: [u8; 48], pub rtmr3: [u8; 48], reserved: [u8; 112], }
pub struct TdxReport { pub report_mac: ReportMac, pub tee_tcb_info: TeeTcbInfo, reserved: [u8; 17], pub td_info: TdInfo, }