Skip to content

Commit

Permalink
Make all measurement declaration under the macro
Browse files Browse the repository at this point in the history
Fix the issue: #2634

Signed-off-by: Wenxing Hou <[email protected]>
  • Loading branch information
Wenxing-hou committed Mar 27, 2024
1 parent d6a8003 commit 1b0972e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/internal/libspdm_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ bool libspdm_verify_key_exchange_rsp_signature(
libspdm_context_t *spdm_context, libspdm_session_info_t *session_info,
const void *sign_data, const size_t sign_data_size);

#if LIBSPDM_ENABLE_CAPABILITY_MEAS_CAP
/**
* This function verifies the measurement signature based upon l1l2.
* If session_info is NULL, this function will use M cache of SPDM context,
Expand All @@ -654,5 +655,6 @@ bool libspdm_verify_measurement_signature(libspdm_context_t *spdm_context,
libspdm_session_info_t *session_info,
const void *sign_data,
size_t sign_data_size);
#endif /* LIBSPDM_ENABLE_CAPABILITY_MEAS_CAP*/

#endif /* SPDM_REQUESTER_LIB_INTERNAL_H */
2 changes: 2 additions & 0 deletions include/internal/libspdm_responder_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ bool libspdm_generate_key_exchange_rsp_signature(libspdm_context_t *spdm_context
libspdm_session_info_t *session_info,
uint8_t *signature);

#if LIBSPDM_ENABLE_CAPABILITY_MEAS_CAP
/**
* This function generates the measurement signature to response message based upon l1l2.
* If session_info is NULL, this function will use M cache of SPDM context,
Expand All @@ -915,5 +916,6 @@ bool libspdm_generate_key_exchange_rsp_signature(libspdm_context_t *spdm_context
bool libspdm_generate_measurement_signature(libspdm_context_t *spdm_context,
libspdm_session_info_t *session_info,
uint8_t *signature);
#endif /* LIBSPDM_ENABLE_CAPABILITY_MEAS_CAP*/

#endif /* SPDM_RESPONDER_LIB_INTERNAL_H */
2 changes: 2 additions & 0 deletions include/library/spdm_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ libspdm_return_t libspdm_challenge_ex2(void *spdm_context, void *reserved,
void *opaque_data,
size_t *opaque_data_size);

#if LIBSPDM_ENABLE_CAPABILITY_MEAS_CAP
/**
* This function sends GET_MEASUREMENT
* to get measurement from the device.
Expand Down Expand Up @@ -345,6 +346,7 @@ libspdm_return_t libspdm_get_measurement_ex2(void *spdm_context, const uint32_t
void *responder_nonce,
void *opaque_data,
size_t *opaque_data_size);
#endif /* LIBSPDM_ENABLE_CAPABILITY_MEAS_CAP*/

#if (LIBSPDM_ENABLE_CAPABILITY_KEY_EX_CAP) || (LIBSPDM_ENABLE_CAPABILITY_PSK_CAP)
/**
Expand Down

0 comments on commit 1b0972e

Please sign in to comment.