Skip to content

Commit

Permalink
1.4 change cap check to >= 1.3.
Browse files Browse the repository at this point in the history
Signed-off-by: Jiewen Yao <[email protected]>
  • Loading branch information
jyao1 committed Nov 14, 2024
1 parent d6f4b0b commit 7a8076b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions library/spdm_requester_lib/libspdm_req_get_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static bool validate_responder_capability(uint32_t capabilities_flag, uint8_t ve
(hbeat_cap == 1) || (key_upd_cap == 1)) {
return false;
}
if (version == SPDM_MESSAGE_VERSION_13) {
if (version >= SPDM_MESSAGE_VERSION_13) {
if (event_cap == 1) {
return false;
}
Expand All @@ -118,7 +118,7 @@ static bool validate_responder_capability(uint32_t capabilities_flag, uint8_t ve
if ((chal_cap == 1) || (key_ex_cap == 1) || (meas_cap == 2) || (mut_auth_cap == 1)) {
return false;
}
if (version == SPDM_MESSAGE_VERSION_13) {
if (version >= SPDM_MESSAGE_VERSION_13) {
if (ep_info_cap == 2) {
return false;
}
Expand Down Expand Up @@ -153,8 +153,8 @@ static bool validate_responder_capability(uint32_t capabilities_flag, uint8_t ve
}
}

/* Checks specific to 1.3. */
if (version == SPDM_MESSAGE_VERSION_13) {
/* Checks specific to 1.3 and higher. */
if (version >= SPDM_MESSAGE_VERSION_13) {
/* Illegal to return reserved values. */
if ((ep_info_cap == 3) || (multi_key_cap == 3)) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions library/spdm_responder_lib/libspdm_rsp_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static bool libspdm_check_request_flag_compatibility(uint32_t capabilities_flag,
(hbeat_cap == 1) || (key_upd_cap == 1)) {
return false;
}
if (version == SPDM_MESSAGE_VERSION_13) {
if (version >= SPDM_MESSAGE_VERSION_13) {
if (event_cap == 1) {
return false;
}
Expand All @@ -110,7 +110,7 @@ static bool libspdm_check_request_flag_compatibility(uint32_t capabilities_flag,
if ((chal_cap == 1) || (mut_auth_cap == 1)) {
return false;
}
if (version == SPDM_MESSAGE_VERSION_13) {
if (version >= SPDM_MESSAGE_VERSION_13) {
if (ep_info_cap == 2) {
return false;
}
Expand All @@ -132,8 +132,8 @@ static bool libspdm_check_request_flag_compatibility(uint32_t capabilities_flag,
}
}

/* Checks specific to 1.3. */
if (version == SPDM_MESSAGE_VERSION_13) {
/* Checks specific to 1.3 and higher. */
if (version >= SPDM_MESSAGE_VERSION_13) {
/* Illegal to return reserved values. */
if ((ep_info_cap == 3) || (multi_key_cap == 3)) {
return false;
Expand Down

0 comments on commit 7a8076b

Please sign in to comment.