Skip to content

Commit

Permalink
Algorithm bitmasks are not booleans
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Bellock <sbellock@nvidia.com>
  • Loading branch information
steven-bellock authored and jyao1 committed Jan 15, 2025
1 parent 2c4d949 commit 8cee530
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c
Original file line number Diff line number Diff line change
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

0 comments on commit 8cee530

Please sign in to comment.