Skip to content

Commit e2e047c

Browse files
authored
Component integrity fix (#70)
Fixed parsing of ComponentIntegrity structs.
1 parent 220cc87 commit e2e047c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/model/component_integrity.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub struct ComponentIntegrity {
4444
pub id: String,
4545
pub name: String,
4646
pub target_component_uri: Option<String>,
47+
#[serde(rename = "SPDM")]
4748
pub spdm: Option<SPDMData>,
4849
pub actions: Option<SPDMActions>,
4950
pub links: Option<ComponentsProtectedLinks>,
@@ -58,10 +59,16 @@ pub struct ComponentsProtectedLinks {
5859
#[derive(Debug, Serialize, Deserialize, Clone)]
5960
#[serde(rename_all = "PascalCase")]
6061
pub struct SPDMData {
61-
pub identity_authentication: ResponderAuthentication,
62+
pub identity_authentication: IdentityAuthentication,
6263
pub requester: ODataId,
6364
}
6465

66+
#[derive(Debug, Serialize, Deserialize, Clone)]
67+
#[serde(rename_all = "PascalCase")]
68+
pub struct IdentityAuthentication {
69+
pub responder_authentication: ResponderAuthentication,
70+
}
71+
6572
#[derive(Debug, Serialize, Deserialize, Clone)]
6673
#[serde(rename_all = "PascalCase")]
6774
pub struct ResponderAuthentication {

0 commit comments

Comments
 (0)