MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / maybe_patch_report_data

Function maybe_patch_report_data

guest-agent-simulator/src/simulator.rs:77–92  ·  view source on GitHub ↗
(
    attestation: &VersionedAttestation,
    report_data: [u8; 64],
    patch_report_data: bool,
    context: &str,
)

Source from the content-addressed store, hash-verified

75}
76
77fn maybe_patch_report_data(
78 attestation: &VersionedAttestation,
79 report_data: [u8; 64],
80 patch_report_data: bool,
81 context: &str,
82) -> AttestationV1 {
83 if !patch_report_data {
84 warn!(
85 context = context,
86 requested_report_data = ?report_data,
87 "simulator is preserving fixture report_data; returned attestation may not match the current request"
88 );
89 return attestation.clone().into_v1();
90 }
91 attestation.clone().into_v1().with_report_data(report_data)
92}

Callers 3

simulated_quote_responseFunction · 0.85

Calls 3

into_v1Method · 0.80
cloneMethod · 0.80
with_report_dataMethod · 0.80

Tested by

no test coverage detected