TDX-specific helpers for attestation schemas that carry TDX platform evidence.
| 469 | |
| 470 | /// TDX-specific helpers for attestation schemas that carry TDX platform evidence. |
| 471 | pub trait TdxAttestationExt { |
| 472 | /// Returns the raw TDX quote bytes if the attestation is backed by TDX. |
| 473 | fn tdx_quote_bytes(&self) -> Option<Vec<u8>>; |
| 474 | |
| 475 | /// Returns the parsed TDX event log if the attestation is backed by TDX. |
| 476 | fn tdx_event_log(&self) -> Option<&[TdxEvent]>; |
| 477 | |
| 478 | /// Returns the TDX event log serialized as JSON. |
| 479 | fn tdx_event_log_string(&self) -> Option<String> { |
| 480 | self.tdx_event_log() |
| 481 | .map(|event_log| serde_json::to_string(event_log).unwrap_or_default()) |
| 482 | } |
| 483 | |
| 484 | /// Returns the parsed TD10 report from the embedded TDX quote. |
| 485 | fn td10_report(&self) -> Option<TDReport10>; |
| 486 | } |
| 487 | |
| 488 | impl TdxAttestationExt for AttestationV1 { |
| 489 | fn tdx_quote_bytes(&self) -> Option<Vec<u8>> { |
no outgoing calls
no test coverage detected