diff --git a/src/rust/cctrusted_vm/src/cvm.rs b/src/rust/cctrusted_vm/src/cvm.rs index 3b3a11b..549eebf 100644 --- a/src/rust/cctrusted_vm/src/cvm.rs +++ b/src/rust/cctrusted_vm/src/cvm.rs @@ -1,6 +1,5 @@ use crate::tdvm::TdxVM; use anyhow::*; -use cctrusted_base::api_data::ReplayResult; use cctrusted_base::cc_type::*; use cctrusted_base::tcg::EventLogEntry; use cctrusted_base::tcg::{TcgAlgorithmRegistry, TcgDigest}; @@ -62,25 +61,6 @@ pub trait CVM { count: Option, ) -> Result, anyhow::Error>; - /*** - replay retrived CVM eventlogs - Args: - array of eventlogs - Returns: - A struct containing the replay result arranged by IMR index and hash algorithm. - Layer 1 key of the struct is the IMR index, the value is another dict which using the - hash algorithm as the key and the replayed measurement as value. - Sample value: - [ - 0: [{ 4: },{ 12: },] - 1: { 12: }, - ] - */ - fn replay_eventlog( - &self, - eventlogs: Vec, - ) -> Result, anyhow::Error>; - /*** retrive CVM type diff --git a/src/rust/cctrusted_vm/src/sdk.rs b/src/rust/cctrusted_vm/src/sdk.rs index a41d973..f5ec597 100644 --- a/src/rust/cctrusted_vm/src/sdk.rs +++ b/src/rust/cctrusted_vm/src/sdk.rs @@ -68,16 +68,6 @@ impl CCTrustedApi for API { } } - // CCTrustedApi trait function: replay eventlogs of a CVM - fn replay_cc_eventlog( - eventlogs: Vec, - ) -> Result, anyhow::Error> { - match build_cvm() { - Ok(cvm) => cvm.replay_eventlog(eventlogs), - Err(e) => Err(anyhow!("[replay_cc_eventlog] error create cvm: {:?}", e)), - } - } - // CCTrustedApi trait function: get default algorithm of a CVM fn get_default_algorithm() -> Result { match build_cvm() { diff --git a/src/rust/cctrusted_vm/src/tdvm.rs b/src/rust/cctrusted_vm/src/tdvm.rs index c066aea..a4a8308 100644 --- a/src/rust/cctrusted_vm/src/tdvm.rs +++ b/src/rust/cctrusted_vm/src/tdvm.rs @@ -2,7 +2,6 @@ use crate::cvm::*; use anyhow::*; -use cctrusted_base::api_data::ReplayResult; use cctrusted_base::cc_type::*; use cctrusted_base::eventlog::EventLogs; use cctrusted_base::tcg::*; @@ -593,13 +592,6 @@ impl CVM for TdxVM { eventlogs.select(start, count) } - fn replay_eventlog( - &self, - eventlogs: Vec, - ) -> Result, anyhow::Error> { - EventLogs::replay(eventlogs, TdxRTMR::max_index().into()) - } - // CVM trait function: retrive CVM type fn get_cc_type(&self) -> CcType { self.cc_type.clone()