File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
common/rust/cctrusted_base/src Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 11use crate :: api_data:: Algorithm ;
22use crate :: api_data:: * ;
3+ use crate :: eventlog:: EventLogs ;
34use crate :: tcg:: EventLogEntry ;
45use crate :: tcg:: TcgDigest ;
56use core:: result:: Result ;
@@ -120,7 +121,9 @@ pub trait CCTrustedApi {
120121 */
121122 fn replay_cc_eventlog (
122123 eventlogs : Vec < EventLogEntry > ,
123- ) -> Result < Vec < ReplayResult > , anyhow:: Error > ;
124+ ) -> Result < Vec < ReplayResult > , anyhow:: Error > {
125+ EventLogs :: replay ( eventlogs)
126+ }
124127}
125128
126129/***
Original file line number Diff line number Diff line change @@ -509,10 +509,7 @@ impl EventLogs {
509509 1: { 12: <measurement_replayed>},
510510 ]
511511 */
512- pub fn replay (
513- eventlogs : Vec < EventLogEntry > ,
514- imr_idx_max : u32 ,
515- ) -> Result < Vec < ReplayResult > , anyhow:: Error > {
512+ pub fn replay ( eventlogs : Vec < EventLogEntry > ) -> Result < Vec < ReplayResult > , anyhow:: Error > {
516513 let mut replay_results: Vec < ReplayResult > = Vec :: new ( ) ;
517514
518515 for event_log in eventlogs {
@@ -522,9 +519,6 @@ impl EventLogs {
522519 continue ;
523520 }
524521 let imr_index = tcg_imr_event. imr_index ;
525- if imr_index > imr_idx_max {
526- return Err ( anyhow ! ( "imr_index {} out of range" , imr_index) ) ;
527- }
528522 for digest in tcg_imr_event. digests {
529523 let algo_id = digest. algo_id ;
530524 let hash = digest. hash ;
You can’t perform that action at this time.
0 commit comments