Skip to content

Commit

Permalink
Provision SPDM1.3 to default version.
Browse files Browse the repository at this point in the history
Signed-off-by: Jiewen Yao <[email protected]>
  • Loading branch information
jyao1 committed Oct 18, 2023
1 parent e384ba4 commit ea5c924
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/industry_standard/spdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#pragma pack(1)

/* 3 means SPDM spec 1.0, 1.1, 1.2 */
#define SPDM_MAX_VERSION_COUNT 3
/* 4 means SPDM spec 1.0, 1.1, 1.2, 1.3 */
#define SPDM_MAX_VERSION_COUNT 4
#define SPDM_MAX_SLOT_COUNT 8
#define SPDM_MAX_OPAQUE_DATA_SIZE 1024

Expand Down
4 changes: 3 additions & 1 deletion library/spdm_common_lib/libspdm_com_context_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -2649,13 +2649,15 @@ libspdm_return_t libspdm_init_context_with_secured_context(void *spdm_context,
sizeof(context->transcript.message_m.buffer);
#endif
context->response_state = LIBSPDM_RESPONSE_STATE_NORMAL;
context->local_context.version.spdm_version_count = 3;
context->local_context.version.spdm_version_count = SPDM_MAX_VERSION_COUNT;
context->local_context.version.spdm_version[0] = SPDM_MESSAGE_VERSION_10 <<
SPDM_VERSION_NUMBER_SHIFT_BIT;
context->local_context.version.spdm_version[1] = SPDM_MESSAGE_VERSION_11 <<
SPDM_VERSION_NUMBER_SHIFT_BIT;
context->local_context.version.spdm_version[2] = SPDM_MESSAGE_VERSION_12 <<
SPDM_VERSION_NUMBER_SHIFT_BIT;
context->local_context.version.spdm_version[3] = SPDM_MESSAGE_VERSION_13 <<
SPDM_VERSION_NUMBER_SHIFT_BIT;
context->local_context.secured_message_version.spdm_version_count = 2;
context->local_context.secured_message_version.spdm_version[0] =
SPDM_MESSAGE_VERSION_10 << SPDM_VERSION_NUMBER_SHIFT_BIT;
Expand Down

0 comments on commit ea5c924

Please sign in to comment.