Skip to content

Commit

Permalink
Add comment explaining MUT_AUTH_CAP check
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Bellock <[email protected]>
  • Loading branch information
steven-bellock committed Dec 23, 2024
1 parent 02aaa49 commit 4dd2800
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/spdm_requester_lib/libspdm_req_get_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ static bool validate_responder_capability(uint32_t capabilities_flag, uint8_t ve

/* Checks that originate from mutual authentication capabilities. */
if (mut_auth_cap == 1) {
/* Mutual authentication with asymmetric keys can only occur through the basic mutual
* authentication flow (CHAL_CAP == 1) or the session-based mutual authentication flow
* (KEY_EX_CAP == 1). */
if ((key_ex_cap == 0) && (chal_cap == 0)) {
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions library/spdm_responder_lib/libspdm_rsp_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ static bool libspdm_check_request_flag_compatibility(uint32_t capabilities_flag,

/* Checks that originate from mutual authentication capabilities. */
if (mut_auth_cap == 1) {
/* Mutual authentication with asymmetric keys can only occur through the basic mutual
* authentication flow (CHAL_CAP == 1) or the session-based mutual authentication flow
* (KEY_EX_CAP == 1). */
if ((key_ex_cap == 0) && (chal_cap == 0)) {
return false;
}
Expand Down

0 comments on commit 4dd2800

Please sign in to comment.