Skip to content

Commit

Permalink
Fixed typos in logs and method name
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Proskurnicki <[email protected]>
  • Loading branch information
pawelpros committed Jan 17, 2025
1 parent 0c74ee6 commit 57b45a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/tdxmeasure/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {
let data = fs::read(path).unwrap();

let event_log = eventlog_rs::Eventlog::try_from(data).unwrap();
let _replayed_rtmr = event_log.replay_measurement_regiestry();
let _replayed_rtmr = event_log.replay_measurement_registry();

println!("{}", event_log);
}
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct ElDigest {
}

impl Eventlog {
pub fn replay_measurement_regiestry(&self) -> HashMap<u32, Vec<u8>> {
pub fn replay_measurement_registry(&self) -> HashMap<u32, Vec<u8>> {
// result dictionary for classifying event logs by rtmr index
// the key is a integer, which represents rtmr index
// the value is a list of event log entries whose rtmr index is equal to its related key
Expand Down Expand Up @@ -111,7 +111,7 @@ impl TryFrom<Vec<u8>> for Eventlog {
index += 4;
let event_type = match EVENTLOG_TYPES.get(&event_type_num) {
Some(type_name) => type_name.to_string(),
None => format!("UNKOWN_TYPE: {:x}", &event_type_num),
None => format!("UNKNOWN_TYPE: {:x}", &event_type_num),
};

let event_type_id = event_type_num;
Expand Down Expand Up @@ -143,7 +143,7 @@ impl TryFrom<Vec<u8>> for Eventlog {
index += 2;
let algorithm = match TCG_ALGORITHMS.get(&digest_algo_num) {
Some(digest_algo_name) => digest_algo_name.to_string(),
None => format!("UNKOWN_ALGORITHM: {:x}", &digest_algo_num),
None => format!("UNKNOWN_ALGORITHM: {:x}", &digest_algo_num),
};
let digest_size = digest_size_map
.get(&digest_algo_num)
Expand Down

0 comments on commit 57b45a2

Please sign in to comment.