Skip to content
Open
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
21 changes: 21 additions & 0 deletions include/library/spdm_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,27 @@ libspdm_return_t libspdm_vendor_send_request_receive_response(

#endif /* LIBSPDM_ENABLE_VENDOR_DEFINED_MESSAGES */

/**
* This function parses a measurement transaction data buffer and extracts the measurement blocks.
*
* This is useful to allow parsing of full transaction blobs from calls such as Redfish's SPDMGetSignedMeasurements.
* This might move into a utility library at a later date.
*
* @param data The measurement transaction data buffer
* @param data_size The size of the measurement transaction data buffer
* @param measurements A pointer to an array of measurement blocks. This must be freed by the caller.
* @param measurement_count A pointer to the number of measurement blocks
*
* @return LIBSPDM_STATUS_SUCCESS if the measurement blocks were successfully extracted
* @return LIBSPDM_STATUS_INVALID_PARAMETER if the parameters are invalid
* @return LIBSPDM_STATUS_BUFFER_TOO_SMALL if the input buffer is too small
**/
libspdm_return_t libspdm_parse_measurement_transaction_data(
void* data,
size_t data_size,
spdm_measurement_block_common_header_t** measurements,
size_t* measurement_count);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 1 addition & 0 deletions library/spdm_requester_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ target_sources(spdm_requester_lib
libspdm_req_get_measurement_extension_log.c
libspdm_req_get_key_pair_info.c
libspdm_req_set_key_pair_info.c
libspdm_req_parse_measurement_transaction_data.c
)
Loading
Loading