Skip to content

Commit

Permalink
Add missing fn fmspc in pcs::TcbData
Browse files Browse the repository at this point in the history
  • Loading branch information
mzohreva committed Dec 6, 2024
1 parent f5cfb9d commit 08435f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion intel-sgx/pcs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pcs"
version = "0.1.0"
version = "0.1.1"
authors = ["Fortanix, Inc."]
license = "MPL-2.0"
edition = "2018"
Expand Down
6 changes: 6 additions & 0 deletions intel-sgx/pcs/src/tcb_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ impl<'de> Deserialize<'de> for TcbData<Unverified> {
}
}

impl TcbData<Verified> {
pub fn fmspc(&self) -> &str {
&self.fmspc
}
}

impl TcbData<Unverified> {
fn parse(raw_tcb_data: &String) -> Result<TcbData<Unverified>, Error> {
let data: TcbData<Unverified> = serde_json::from_str(&raw_tcb_data).map_err(|e| Error::ParseError(e))?;
Expand Down

0 comments on commit 08435f4

Please sign in to comment.