(
attestation: &VersionedAttestation,
report_data: [u8; 64],
vm_config: &str,
patch_report_data: bool,
)
| 25 | } |
| 26 | |
| 27 | pub fn simulated_quote_response( |
| 28 | attestation: &VersionedAttestation, |
| 29 | report_data: [u8; 64], |
| 30 | vm_config: &str, |
| 31 | patch_report_data: bool, |
| 32 | ) -> Result<GetQuoteResponse> { |
| 33 | let attestation = maybe_patch_report_data(attestation, report_data, patch_report_data, "quote"); |
| 34 | let Some(quote) = attestation.tdx_quote_bytes() else { |
| 35 | return Err(anyhow!("Quote not found")); |
| 36 | }; |
| 37 | |
| 38 | Ok(GetQuoteResponse { |
| 39 | quote, |
| 40 | event_log: attestation.tdx_event_log_string().unwrap_or_default(), |
| 41 | report_data: report_data.to_vec(), |
| 42 | vm_config: vm_config.to_string(), |
| 43 | }) |
| 44 | } |
| 45 | |
| 46 | pub fn simulated_attest_response( |
| 47 | attestation: &VersionedAttestation, |
no test coverage detected