(path: &str)
| 392 | } |
| 393 | |
| 394 | fn read_generation(path: &str) -> Result<i64> { |
| 395 | let content = fs::read_to_string(path) |
| 396 | .map_err(|e| TdxAttestError::Unexpected(format!("read {path}: {e}")))?; |
| 397 | content |
| 398 | .trim() |
| 399 | .parse() |
| 400 | .map_err(|e| TdxAttestError::Unexpected(format!("parse generation: {e}"))) |
| 401 | } |
| 402 | |
| 403 | fn write_inblob_with_retry(path: &str, data: &TdxReportData) -> Result<()> { |
| 404 | const RETRY_WAIT_MS: u64 = 10000; // 10 seconds |
no test coverage detected