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

Function load_versioned_attestation

guest-agent-simulator/src/simulator.rs:15–25  ·  view source on GitHub ↗
(path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

13use tracing::warn;
14
15pub fn load_versioned_attestation(path: impl AsRef<Path>) -> Result<VersionedAttestation> {
16 let path = path.as_ref();
17 let attestation_bytes = fs::read(path).with_context(|| {
18 format!(
19 "Failed to read simulator attestation file: {}",
20 path.display()
21 )
22 })?;
23 VersionedAttestation::from_bytes(&attestation_bytes)
24 .context("Failed to decode simulator attestation")
25}
26
27pub fn simulated_quote_response(
28 attestation: &VersionedAttestation,

Callers 3

mainFunction · 0.85
load_fixture_platformFunction · 0.85

Calls 1

as_refMethod · 0.45