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

Algorithm bitmasks are not booleans #2954

Merged
merged 1 commit into from
Jan 15, 2025
Merged
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
10 changes: 5 additions & 5 deletions library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Copyright Notice:
* Copyright 2021-2024 DMTF. All rights reserved.
* Copyright 2021-2025 DMTF. All rights reserved.
* License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
**/

Expand Down Expand Up @@ -111,16 +111,16 @@ static libspdm_return_t libspdm_try_negotiate_algorithms(libspdm_context_t *spdm
spdm_request->header.spdm_version = libspdm_get_connection_version (spdm_context);
if (spdm_request->header.spdm_version >= SPDM_MESSAGE_VERSION_11) {
/* Number of Algorithms Structure Tables based on supported algorithms */
if (spdm_context->local_context.algorithm.dhe_named_group) {
if (spdm_context->local_context.algorithm.dhe_named_group != 0) {
req_param1++;
}
if (spdm_context->local_context.algorithm.aead_cipher_suite) {
if (spdm_context->local_context.algorithm.aead_cipher_suite != 0) {
req_param1++;
}
if (spdm_context->local_context.algorithm.req_base_asym_alg) {
if (spdm_context->local_context.algorithm.req_base_asym_alg != 0) {
req_param1++;
}
if (spdm_context->local_context.algorithm.key_schedule) {
if (spdm_context->local_context.algorithm.key_schedule != 0) {
req_param1++;
}
LIBSPDM_ASSERT(req_param1 <=
Expand Down
Loading