diff --git a/CHANGELOG.md b/CHANGELOG.md index e05698858..915483557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - os: the Yocto guest-OS backend (`os/yocto/`) is deprecated in favor of mkosi (`os/mkosi/`), which is now the default and recommended backend. `os/build.sh` defaults to `--backend mkosi`, and `make os-image` / `make os-repro-check` build with mkosi. The Yocto builds move to `make os-image-yocto` / `make os-repro-check-yocto`; `make os-image-mkosi` / `make os-repro-check-mkosi` remain as aliases. Every Yocto entrypoint prints a deprecation warning, and the backend is kept only to rebuild existing Yocto images. The mkosi build still reads patches, units and scripts from `os/yocto/`, so the directory stays until those files move ### Removed +- verifier: the `debug` request field and the `acpi_tables` / `rtmr_debug` response fields. The per-event RTMR diff never had the events it diffed, so it reported every expected digest as missing. Requests that still send `debug` are accepted and the field is ignored. - sdk: `TlsKeyOptions.path` in the JavaScript SDK. `GetTlsKeyArgs` has no such field and `getTlsKey` never read it, so a caller who set it was silently ignored. Breaking at the type level only, and only for code whose value was already being discarded. `deriveKey`'s `path` is a real, deprecated Tappd-era parameter and stays; the Python, Rust and Go v0 TLS-key options never carried one - guest-agent: the `EmitEvent` RPC no longer records anything -- runtime RTMR3 events are system-owned in 0.6.0, so an app can no longer extend the measurement chain. The method itself stays on the unversioned path and always fails with an error naming the removal, rather than being deleted outright: a deleted method answers HTTP 404 `Service not found: EmitEvent`, which tells a 0.5.x caller nothing about why its events stopped being recorded, while the kept stub fails with a message naming the removal and pointing at `report_data`. **Breaking:** any app extending RTMR3 at runtime must stop; bind app data through `report_data` instead, which is what most callers wanted anyway - gateway: `core.debug.insecure_skip_attestation`. It turned off both checks that make a gateway cluster a trust boundary: the node stopped asking its guest agent for its own app id, and every WaveKV sync and push, plus `ensure_from_gateway`, stopped checking the peer's. With it set, anything that could reach the sync routes could insert entries that replicated to every gateway in the cluster. It existed only because the integration suites could not run without it; they now run against a guest agent simulator and verify quotes through the production path, so nothing sets it. `docs/security/security-model.md` argues dstack's development switches are acceptable because they are visible in attestation measurements or public contract state -- that argument cannot cover the switch deciding whether attestation happens at all, which is why this one is deleted rather than documented. There is no replacement. **Breaking:** the config struct does not use `deny_unknown_fields`, so a leftover line is ignored rather than rejected, and what follows depends on why it was set. On a TDX host with a guest agent the gateway starts normally and peers that cannot present a verifiable app id stop being accepted. On a host with no guest agent -- the usual reason to have set it -- the gateway no longer starts at all, failing with `Failed to get app info`, because `my_app_id` is what every peer check compares against and a node that cannot learn its own identity must not come up without one. Remove the line and make sure every node can attest diff --git a/dstack/dstack-mr/cli/src/main.rs b/dstack/dstack-mr/cli/src/main.rs index 6f52081d3..d8e4f0211 100644 --- a/dstack/dstack-mr/cli/src/main.rs +++ b/dstack/dstack-mr/cli/src/main.rs @@ -325,7 +325,7 @@ fn run_diagnose(config: &DiagnoseConfig) -> Result<()> { let initrd = image_dir.join(&image_info.initrd).display().to_string(); let cmdline = dstack_mr::tdx::measured_kernel_cmdline(&image_info.cmdline); - // Same resolution order as the verifier (see verifier::compute_measurement_details): + // Same resolution order as the verifier (see verifier::compute_measurements): // explicit vm_config.ovmf_variant > image_info.ovmf_variant > legacy default. let ovmf_variant = vm .ovmf_variant diff --git a/dstack/dstack-mr/src/machine.rs b/dstack/dstack-mr/src/machine.rs index 7925d3df0..c30323030 100644 --- a/dstack/dstack-mr/src/machine.rs +++ b/dstack/dstack-mr/src/machine.rs @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: Apache-2.0 -use crate::acpi::Tables; use crate::tdvf::Tdvf; use crate::util::debug_print_log; use crate::{kernel, OvmfVariant, RtmrLogs, TdxMeasurements}; @@ -115,7 +114,6 @@ pub struct VersionedOptions { pub struct TdxMeasurementDetails { pub measurements: TdxMeasurements, pub rtmr_logs: RtmrLogs, - pub acpi_tables: Tables, } impl Machine<'_> { @@ -132,7 +130,7 @@ impl Machine<'_> { let mrtd = tdvf.mrtd(self).context("Failed to compute MR TD")?; - let (rtmr0_log, acpi_tables) = tdvf + let rtmr0_log = tdvf .rtmr0_log(self) .context("Failed to compute RTMR0 log")?; debug_print_log("RTMR0", &rtmr0_log); @@ -163,7 +161,6 @@ impl Machine<'_> { rtmr2, }, rtmr_logs: [rtmr0_log, rtmr1_log, rtmr2_log], - acpi_tables, }) } } diff --git a/dstack/dstack-mr/src/tdvf.rs b/dstack/dstack-mr/src/tdvf.rs index 3f6393713..23a922151 100644 --- a/dstack/dstack-mr/src/tdvf.rs +++ b/dstack/dstack-mr/src/tdvf.rs @@ -7,7 +7,6 @@ use hex_literal::hex; use scale::Decode; use sha2::{Digest, Sha384}; -use crate::acpi::Tables; use crate::num::read_le; use crate::{measure_log, measure_sha384, utf16_encode, Machine, OvmfVariant, RtmrLog}; @@ -497,23 +496,17 @@ impl<'a> Tdvf<'a> { #[allow(dead_code)] pub fn rtmr0(&self, machine: &Machine) -> Result> { - let (rtmr0_log, _) = self.rtmr0_log(machine)?; - Ok(measure_log(&rtmr0_log)) + Ok(measure_log(&self.rtmr0_log(machine)?)) } - pub fn rtmr0_log(&self, machine: &Machine) -> Result<(RtmrLog, Tables)> { + pub fn rtmr0_log(&self, machine: &Machine) -> Result { let tables = machine.build_tables()?; let acpi_hashes = AcpiTableHashes { tables: measure_sha384(&tables.tables), rsdp: measure_sha384(&tables.rsdp), loader: measure_sha384(&tables.loader), }; - let log = self.rtmr0_log_with_acpi_hashes( - machine.memory_size, - machine.ovmf_variant, - &acpi_hashes, - )?; - Ok((log, tables)) + self.rtmr0_log_with_acpi_hashes(machine.memory_size, machine.ovmf_variant, &acpi_hashes) } pub(crate) fn rtmr0_log_with_acpi_hashes( diff --git a/dstack/kms/src/main_service.rs b/dstack/kms/src/main_service.rs index e3f35afdf..d4bad106a 100644 --- a/dstack/kms/src/main_service.rs +++ b/dstack/kms/src/main_service.rs @@ -347,7 +347,7 @@ impl RpcHandler { let mut detail = VerificationDetails::default(); self.state .verifier - .verify_os_image_hash(vm_config, report, false, &mut detail) + .verify_os_image_hash(vm_config, report, &mut detail) .await .context("Failed to verify os image hash")?; Ok(()) diff --git a/dstack/tests/e2e/attestation/run-platform.sh b/dstack/tests/e2e/attestation/run-platform.sh index b025b511c..1ce12ac1c 100755 --- a/dstack/tests/e2e/attestation/run-platform.sh +++ b/dstack/tests/e2e/attestation/run-platform.sh @@ -186,7 +186,7 @@ if ! ATTESTATION_HEX=$(dstack-util attest --report-data "$REPORT_DATA" --hex); t exit 1 fi jq -n --arg attestation "$ATTESTATION_HEX" \ - '{attestation: $attestation, debug: true}' > "$WORK/request.json" + '{attestation: $attestation}' > "$WORK/request.json" cat > "$WORK/verifier.toml" <, #[serde(with = "serde_bytes", default)] pub attestation: Option>, - #[serde(default)] - pub debug: Option, } #[derive(Debug, Clone, Serialize)] @@ -115,48 +113,6 @@ pub struct VerificationDetails { /// Canonical auth-policy input matching the KMS bootAuth payload. #[serde(skip_serializing_if = "Option::is_none")] pub boot_info: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub acpi_tables: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub rtmr_debug: Option>, -} - -#[derive(Debug, Clone, Serialize)] -pub struct AcpiTables { - pub tables: String, - pub rsdp: String, - pub loader: String, -} - -#[derive(Debug, Clone, Serialize)] -pub struct RtmrMismatch { - pub rtmr: String, - pub expected: String, - pub actual: String, - pub events: Vec, - #[serde(skip_serializing_if = "Vec::is_empty")] - pub missing_expected_digests: Vec, -} - -#[derive(Debug, Clone, Serialize)] -pub struct RtmrEventEntry { - pub index: usize, - pub event_type: u32, - pub event_name: String, - pub actual_digest: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub expected_digest: Option, - pub payload_len: usize, - pub status: RtmrEventStatus, -} - -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "snake_case")] -pub enum RtmrEventStatus { - Match, - Mismatch, - Extra, - Missing, } #[cfg(test)] @@ -176,7 +132,6 @@ mod tests { assert_eq!(req.event_log.as_deref(), Some("[]")); assert_eq!(req.vm_config.as_deref(), Some("{}")); assert_eq!(req.attestation, None); - assert_eq!(req.debug, None); } #[test] @@ -194,7 +149,6 @@ mod tests { let req: VerificationRequest = serde_json::from_str("{}").unwrap(); assert_eq!(req.quote, None); assert_eq!(req.attestation, None); - assert_eq!(req.debug, None); } #[test] diff --git a/dstack/verifier/src/verification.rs b/dstack/verifier/src/verification.rs index 0d8f1add9..6313177ae 100644 --- a/dstack/verifier/src/verification.rs +++ b/dstack/verifier/src/verification.rs @@ -17,9 +17,7 @@ use cc_eventlog::{ }, TdxEvent, }; -use dstack_mr::{ - tdx::TdxRtmr0AcpiHashes, RtmrLog, RtmrLogs, TdxMeasurementDetails, TdxMeasurements, -}; +use dstack_mr::{tdx::TdxRtmr0AcpiHashes, TdxMeasurements}; use dstack_types::{TdxAttestationVariant, VmConfig}; use hex_literal::hex; use ra_tls::attestation::{ @@ -32,8 +30,7 @@ use tokio::{io::AsyncWriteExt, process::Command}; use tracing::{debug, info, warn}; use crate::types::{ - AcpiTables, PolicyBootInfo, RtmrEventEntry, RtmrEventStatus, RtmrMismatch, VerificationDetails, - VerificationRequest, VerificationResponse, + PolicyBootInfo, VerificationDetails, VerificationRequest, VerificationResponse, }; /// Return the canonical TCB status and advisory list used by auth policy. @@ -88,99 +85,6 @@ fn decode_key_provider_info(bytes: &[u8]) -> Option RtmrMismatch { - let expected_hex = hex::encode(expected); - let actual_hex = hex::encode(actual); - - let mut events = Vec::new(); - - for (&idx, expected_digest) in actual_indices.iter().zip(expected_sequence.iter()) { - match event_log.get(idx) { - Some(event) => { - let event_name = if event.event.is_empty() { - "(unnamed)".to_string() - } else { - event.event.clone() - }; - let status = if event.digest() == expected_digest.as_slice() { - RtmrEventStatus::Match - } else { - RtmrEventStatus::Mismatch - }; - events.push(RtmrEventEntry { - index: idx, - event_type: event.event_type, - event_name, - actual_digest: hex::encode(event.digest()), - expected_digest: Some(hex::encode(expected_digest)), - payload_len: event.event_payload.len(), - status, - }); - } - None => { - events.push(RtmrEventEntry { - index: idx, - event_type: 0, - event_name: "(missing)".to_string(), - actual_digest: String::new(), - expected_digest: Some(hex::encode(expected_digest)), - payload_len: 0, - status: RtmrEventStatus::Missing, - }); - } - } - } - - for &idx in actual_indices.iter().skip(expected_sequence.len()) { - let (event_type, event_name, actual_digest, payload_len) = match event_log.get(idx) { - Some(event) => ( - event.event_type, - if event.event.is_empty() { - "(unnamed)".to_string() - } else { - event.event.clone() - }, - hex::encode(event.digest()), - event.event_payload.len(), - ), - None => (0, "(missing)".to_string(), String::new(), 0), - }; - events.push(RtmrEventEntry { - index: idx, - event_type, - event_name, - actual_digest, - expected_digest: None, - payload_len, - status: RtmrEventStatus::Extra, - }); - } - - let missing_expected_digests = if expected_sequence.len() > actual_indices.len() { - expected_sequence[actual_indices.len()..] - .iter() - .map(hex::encode) - .collect() - } else { - Vec::new() - }; - - RtmrMismatch { - rtmr: rtmr_label.to_string(), - expected: expected_hex.to_string(), - actual: actual_hex.to_string(), - events, - missing_expected_digests, - } -} - // Bump whenever expected RTMR computation changes so stale entries get ignored. // v3: all supported OVMF measurements use the Pre202505 RTMR[0] layout. // @@ -312,7 +216,7 @@ impl CvmVerifier { Ok(()) } - fn compute_measurement_details( + fn compute_measurements( &self, vm_config: &VmConfig, fw_path: &Path, @@ -320,7 +224,7 @@ impl CvmVerifier { initrd_path: &Path, kernel_cmdline: &str, kernel_header_normalized: bool, - ) -> Result { + ) -> Result { let firmware = fw_path.display().to_string(); let kernel = kernel_path.display().to_string(); let initrd = initrd_path.display().to_string(); @@ -329,7 +233,7 @@ impl CvmVerifier { // deployments fall back to the only layout that existed back then. let ovmf_variant = vm_config.ovmf_variant.unwrap_or_default(); - let details = dstack_mr::Machine::builder() + dstack_mr::Machine::builder() .cpu_count(vm_config.cpu_count) .memory_size(vm_config.memory_size) .firmware(&firmware) @@ -356,30 +260,8 @@ impl CvmVerifier { .host_share_mode(vm_config.host_share_mode.clone()) .ovmf_variant(ovmf_variant) .build() - .measure_with_logs() - .context("Failed to compute expected MRs")?; - - Ok(details) - } - - fn compute_measurements( - &self, - vm_config: &VmConfig, - fw_path: &Path, - kernel_path: &Path, - initrd_path: &Path, - kernel_cmdline: &str, - kernel_header_normalized: bool, - ) -> Result { - self.compute_measurement_details( - vm_config, - fw_path, - kernel_path, - initrd_path, - kernel_cmdline, - kernel_header_normalized, - ) - .map(|details| details.measurements) + .measure() + .context("Failed to compute expected MRs") } fn load_or_compute_measurements( @@ -719,7 +601,6 @@ impl CvmVerifier { }; let mut details = VerificationDetails::default(); - let debug = request.debug.unwrap_or(false); let attestation = attestation.into_v1(); let verified = attestation.verify(&self.attestation_verifier).await; let verified_attestation = match verified { @@ -748,7 +629,6 @@ impl CvmVerifier { .verify_os_image_hash( request_vm_config.clone(), &verified_attestation, - debug, &mut details, ) .await; @@ -794,7 +674,6 @@ impl CvmVerifier { &self, vm_config: String, attestation: &VerifiedAttestation, - debug: bool, details: &mut VerificationDetails, ) -> Result { // The raw config string used for platform-specific binding: the explicit @@ -829,22 +708,12 @@ impl CvmVerifier { // rather than degraded to a download. AttestationQuote::DstackTdx(_) => match vm_config.tdx_attestation_variant { TdxAttestationVariant::Legacy => { - self.verify_os_image_hash_for_dstack_tdx( - &vm_config, - attestation, - debug, - details, - ) - .await?; + self.verify_os_image_hash_for_dstack_tdx(&vm_config, attestation, details) + .await?; } TdxAttestationVariant::Lite => { - self.verify_os_image_hash_for_dstack_tdx_lite( - &vm_config, - attestation, - debug, - details, - ) - .await?; + self.verify_os_image_hash_for_dstack_tdx_lite(&vm_config, attestation, details) + .await?; } }, AttestationQuote::DstackNitroEnclave(_) => { @@ -909,27 +778,9 @@ impl CvmVerifier { &self, vm_config: &VmConfig, attestation: &VerifiedAttestation, - debug: bool, details: &mut VerificationDetails, ) -> Result<()> { - let Some(report) = &attestation.report.tdx_report() else { - bail!("No TDX report"); - }; - let Some(tdx_quote) = attestation.tdx_quote() else { - bail!("No TDX quote"); - }; - let event_log = &tdx_quote.event_log; - let report = report - .report - .as_td10() - .context("Failed to decode TD report")?; - - let verified_mrs = Mrs { - mrtd: report.mr_td.to_vec(), - rtmr0: report.rt_mr0.to_vec(), - rtmr1: report.rt_mr1.to_vec(), - rtmr2: report.rt_mr2.to_vec(), - }; + let verified_mrs = verified_tdx_mrs(attestation)?; // Legacy TDX attestation keeps the original KMS verifier semantics: // os_image_hash must be the image digest (digest.txt = @@ -946,57 +797,17 @@ impl CvmVerifier { details.os_image_version = Some(image_paths.version.clone()); } - let (mrs, expected_logs) = if debug { - let TdxMeasurementDetails { - measurements, - rtmr_logs, - acpi_tables, - } = self - .compute_measurement_details( - vm_config, - &image_paths.fw_path, - &image_paths.kernel_path, - &image_paths.initrd_path, - &image_paths.kernel_cmdline, - image_paths.kernel_header_normalized, - ) - .context("Failed to compute expected measurements")?; - - details.acpi_tables = Some(AcpiTables { - tables: hex::encode(&acpi_tables.tables), - rsdp: hex::encode(&acpi_tables.rsdp), - loader: hex::encode(&acpi_tables.loader), - }); - - (measurements, Some(rtmr_logs)) - } else { - ( - self.load_or_compute_measurements( - vm_config, - &image_paths.fw_path, - &image_paths.kernel_path, - &image_paths.initrd_path, - &image_paths.kernel_cmdline, - image_paths.kernel_header_normalized, - ) - .context("Failed to compute expected measurements")?, - None, + let expected_mrs = self + .load_or_compute_measurements( + vm_config, + &image_paths.fw_path, + &image_paths.kernel_path, + &image_paths.initrd_path, + &image_paths.kernel_cmdline, + image_paths.kernel_header_normalized, ) - }; - - self.compare_tdx_mrs( - Mrs { - mrtd: mrs.mrtd, - rtmr0: mrs.rtmr0, - rtmr1: mrs.rtmr1, - rtmr2: mrs.rtmr2, - }, - verified_mrs, - expected_logs.as_ref(), - event_log, - debug, - details, - )?; + .context("Failed to compute expected measurements")?; + assert_tdx_mrs_eq(&expected_mrs, &verified_mrs).context("MRs do not match")?; details.acpi_tables_verified = true; Ok(()) } @@ -1005,29 +816,13 @@ impl CvmVerifier { &self, vm_config: &VmConfig, attestation: &VerifiedAttestation, - _debug: bool, details: &mut VerificationDetails, ) -> Result<()> { - let Some(report) = &attestation.report.tdx_report() else { - bail!("No TDX report"); - }; + let verified_mrs = verified_tdx_mrs(attestation)?; let Some(tdx_quote) = attestation.tdx_quote() else { bail!("No TDX quote"); }; let event_log = &tdx_quote.event_log; - // Get boot info from attestation - let report = report - .report - .as_td10() - .context("Failed to decode TD report")?; - - // Extract the verified MRs from the report - let verified_mrs = Mrs { - mrtd: report.mr_td.to_vec(), - rtmr0: report.rt_mr0.to_vec(), - rtmr1: report.rt_mr1.to_vec(), - rtmr2: report.rt_mr2.to_vec(), - }; let document = vm_config .tdx_measurement @@ -1073,85 +868,13 @@ impl CvmVerifier { details.acpi_tables_verified = true; // RTMR0 below is rebuilt from the recomputed digests, so the expected // value depends on nothing the host reported about the tables. - let mrs = dstack_mr::tdx::tdx_measurements_from_measurement_document( + let expected_mrs = dstack_mr::tdx::tdx_measurements_from_measurement_document( document, vm_config, &acpi_hashes, ) .context("Failed to compute TDX expected measurements without image download")?; - - let expected_mrs = Mrs { - mrtd: mrs.mrtd.clone(), - rtmr0: mrs.rtmr0.clone(), - rtmr1: mrs.rtmr1.clone(), - rtmr2: mrs.rtmr2.clone(), - }; - expected_mrs - .assert_eq(&verified_mrs) - .context("MRs do not match") - } - - fn compare_tdx_mrs( - &self, - expected_mrs: Mrs, - verified_mrs: Mrs, - expected_logs: Option<&RtmrLogs>, - event_log: &[TdxEvent], - debug: bool, - details: &mut VerificationDetails, - ) -> Result<()> { - match expected_mrs.assert_eq(&verified_mrs) { - Ok(()) => Ok(()), - Err(e) => { - let result = Err(e).context("MRs do not match"); - if !debug { - return result; - } - let Some(expected_logs) = expected_logs else { - return result; - }; - let mut rtmr_debug = Vec::new(); - - if expected_mrs.rtmr0 != verified_mrs.rtmr0 { - rtmr_debug.push(collect_rtmr_mismatch( - "RTMR0", - &expected_mrs.rtmr0, - &verified_mrs.rtmr0, - &expected_logs[0], - &[], - event_log, - )); - } - - if expected_mrs.rtmr1 != verified_mrs.rtmr1 { - rtmr_debug.push(collect_rtmr_mismatch( - "RTMR1", - &expected_mrs.rtmr1, - &verified_mrs.rtmr1, - &expected_logs[1], - &[], - event_log, - )); - } - - if expected_mrs.rtmr2 != verified_mrs.rtmr2 { - rtmr_debug.push(collect_rtmr_mismatch( - "RTMR2", - &expected_mrs.rtmr2, - &verified_mrs.rtmr2, - &expected_logs[2], - &[], - event_log, - )); - } - - if !rtmr_debug.is_empty() { - details.rtmr_debug = Some(rtmr_debug); - } - - result - } - } + assert_tdx_mrs_eq(&expected_mrs, &verified_mrs).context("MRs do not match") } /// Verify Nitro Enclave OS image hash using the signature-verified NSM PCRs. @@ -1377,46 +1100,39 @@ impl CvmVerifier { } } -#[derive(Debug, Clone)] -struct Mrs { - mrtd: Vec, - rtmr0: Vec, - rtmr1: Vec, - rtmr2: Vec, +/// MRTD and RTMR0-2 from the verified TD report. +fn verified_tdx_mrs(attestation: &VerifiedAttestation) -> Result { + let report = attestation + .report + .tdx_report() + .context("No TDX report")? + .report + .as_td10() + .context("Failed to decode TD report")?; + Ok(TdxMeasurements { + mrtd: report.mr_td.to_vec(), + rtmr0: report.rt_mr0.to_vec(), + rtmr1: report.rt_mr1.to_vec(), + rtmr2: report.rt_mr2.to_vec(), + }) } -impl Mrs { - fn assert_eq(&self, other: &Self) -> Result<()> { - if self.mrtd != other.mrtd { - bail!( - "MRTD mismatch: expected={}, actual={}", - hex::encode(&self.mrtd), - hex::encode(&other.mrtd) - ); - } - if self.rtmr0 != other.rtmr0 { +fn assert_tdx_mrs_eq(expected: &TdxMeasurements, actual: &TdxMeasurements) -> Result<()> { + for (name, expected, actual) in [ + ("MRTD", &expected.mrtd, &actual.mrtd), + ("RTMR0", &expected.rtmr0, &actual.rtmr0), + ("RTMR1", &expected.rtmr1, &actual.rtmr1), + ("RTMR2", &expected.rtmr2, &actual.rtmr2), + ] { + if expected != actual { bail!( - "RTMR0 mismatch: expected={}, actual={}", - hex::encode(&self.rtmr0), - hex::encode(&other.rtmr0) + "{name} mismatch: expected={}, actual={}", + hex::encode(expected), + hex::encode(actual) ); } - if self.rtmr1 != other.rtmr1 { - bail!( - "RTMR1 mismatch: expected={}, actual={}", - hex::encode(&self.rtmr1), - hex::encode(&other.rtmr1) - ); - } - if self.rtmr2 != other.rtmr2 { - bail!( - "RTMR2 mismatch: expected={}, actual={}", - hex::encode(&self.rtmr2), - hex::encode(&other.rtmr2) - ); - } - Ok(()) } + Ok(()) } #[cfg(test)] @@ -2360,7 +2076,6 @@ mod tests { event_log: None, vm_config: None, attestation: Some(attestation), - debug: None, }) .await .expect("verifier runs"); @@ -2585,7 +2300,6 @@ mod tests { event_log: None, vm_config: None, attestation: Some(forged), - debug: None, }) .await .expect("verifier runs");