(path: impl AsRef<Path>)
| 13 | use tracing::warn; |
| 14 | |
| 15 | pub 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 | |
| 27 | pub fn simulated_quote_response( |
| 28 | attestation: &VersionedAttestation, |