Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment explaining MUT_AUTH_CAP check #2939

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading