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

Support DOE Discovery Version #360

Merged
merged 2 commits into from
Aug 1, 2024
Merged
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
3 changes: 2 additions & 1 deletion include/library/pci_doe_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

libspdm_return_t pci_doe_discovery (const void *pci_doe_context,
pci_doe_data_object_protocol_t *data_object_protocol,
size_t *data_object_protocol_size);
size_t *data_object_protocol_size,
uint8_t version);

/* external provided function */

Expand Down
4 changes: 3 additions & 1 deletion library/pci_doe_requester_lib/pci_doe_req_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ typedef struct {

libspdm_return_t pci_doe_discovery (const void *pci_doe_context,
pci_doe_data_object_protocol_t *data_object_protocol,
size_t *data_object_protocol_size)
size_t *data_object_protocol_size,
uint8_t version)
{
doe_discovery_request_mine_t doe_request;
doe_discovery_response_mine_t doe_response;
Expand All @@ -52,6 +53,7 @@ libspdm_return_t pci_doe_discovery (const void *pci_doe_context,
doe_request.doe_header.data_object_type = PCI_DOE_DATA_OBJECT_TYPE_DOE_DISCOVERY;
doe_request.doe_header.length = sizeof(doe_discovery_request_mine_t) / sizeof(uint32_t);
doe_request.doe_discovery_request.index = 0;
doe_request.doe_discovery_request.version = version;

do {
if (total_index <
Expand Down
2 changes: 1 addition & 1 deletion libspdm
Submodule libspdm updated 46 files
+7 −5 README.md
+1 −1 VERSION.md
+8 −6 doc/design.md
+2 −1 include/industry_standard/pcidoe.h
+5 −9 include/internal/libspdm_common_lib.h
+7 −3 include/internal/libspdm_secured_message_lib.h
+2 −2 include/library/spdm_common_lib.h
+118 −133 include/library/spdm_lib_config.h
+16 −0 include/library/spdm_transport_pcidoe_lib.h
+2 −7 library/spdm_common_lib/libspdm_com_context_data_session.c
+5 −2 library/spdm_requester_lib/libspdm_req_challenge.c
+2 −0 library/spdm_requester_lib/libspdm_req_communication.c
+1 −4 library/spdm_requester_lib/libspdm_req_encap_request.c
+2 −2 library/spdm_requester_lib/libspdm_req_end_session.c
+3 −1 library/spdm_requester_lib/libspdm_req_finish.c
+7 −3 library/spdm_requester_lib/libspdm_req_get_capabilities.c
+1 −1 library/spdm_requester_lib/libspdm_req_get_certificate.c
+2 −1 library/spdm_requester_lib/libspdm_req_get_csr.c
+1 −1 library/spdm_requester_lib/libspdm_req_get_digests.c
+1 −1 library/spdm_requester_lib/libspdm_req_get_event_types.c
+0 −1 library/spdm_requester_lib/libspdm_req_get_measurement_extension_log.c
+22 −7 library/spdm_requester_lib/libspdm_req_get_measurements.c
+2 −2 library/spdm_requester_lib/libspdm_req_get_version.c
+2 −1 library/spdm_requester_lib/libspdm_req_handle_error_response.c
+2 −2 library/spdm_requester_lib/libspdm_req_heartbeat.c
+8 −1 library/spdm_requester_lib/libspdm_req_key_exchange.c
+2 −2 library/spdm_requester_lib/libspdm_req_key_update.c
+4 −2 library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c
+4 −1 library/spdm_requester_lib/libspdm_req_psk_exchange.c
+3 −2 library/spdm_requester_lib/libspdm_req_psk_finish.c
+3 −1 library/spdm_requester_lib/libspdm_req_set_certificate.c
+4 −1 library/spdm_requester_lib/libspdm_req_vendor_request.c
+5 −3 library/spdm_responder_lib/libspdm_rsp_measurements.c
+3 −8 library/spdm_secured_message_lib/libspdm_secmes_context_data.c
+45 −1 library/spdm_transport_pcidoe_lib/libspdm_doe_pcidoe.c
+6 −1 ...t/fuzzing/test_transport/test_spdm_transport_pci_doe_decode_message/spdm_transport_pci_doe_decode_message.c
+8 −8 unit_test/test_spdm_requester/error_test/key_exchange_err.c
+147 −0 unit_test/test_spdm_requester/finish.c
+18 −18 unit_test/test_spdm_requester/key_exchange.c
+2 −2 unit_test/test_spdm_requester/key_update.c
+4 −4 unit_test/test_spdm_requester/psk_exchange.c
+122 −0 unit_test/test_spdm_responder/finish.c
+1 −1 unit_test/test_spdm_responder/key_exchange.c
+2 −2 unit_test/test_spdm_responder/key_update.c
+1 −1 unit_test/test_spdm_responder/psk_exchange.c
+4 −0 unit_test/test_spdm_responder/respond_if_ready.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "spdm_device_attester_sample.h"

void *m_pci_doe_context;
#define DOE_DISCOVERY_VERSION 0

libspdm_return_t pci_doe_init_request()
{
Expand All @@ -17,7 +18,7 @@ libspdm_return_t pci_doe_init_request()

data_object_protocol_size = sizeof(data_object_protocol);
status =
pci_doe_discovery (m_pci_doe_context, data_object_protocol, &data_object_protocol_size);
pci_doe_discovery (m_pci_doe_context, data_object_protocol, &data_object_protocol_size, DOE_DISCOVERY_VERSION);
if (LIBSPDM_STATUS_IS_ERROR(status)) {
return status;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "spdm_device_validator_sample.h"

void *m_pci_doe_context;
#define DOE_DISCOVERY_VERSION 0

libspdm_return_t pci_doe_init_request()
{
Expand All @@ -17,7 +18,7 @@ libspdm_return_t pci_doe_init_request()

data_object_protocol_size = sizeof(data_object_protocol);
status =
pci_doe_discovery (m_pci_doe_context, data_object_protocol, &data_object_protocol_size);
pci_doe_discovery (m_pci_doe_context, data_object_protocol, &data_object_protocol_size, DOE_DISCOVERY_VERSION);
if (LIBSPDM_STATUS_IS_ERROR(status)) {
return status;
}
Expand Down
3 changes: 2 additions & 1 deletion spdm_emu/spdm_requester_emu/spdm_requester_pci_doe.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "spdm_requester_emu.h"

void *m_pci_doe_context;
#define DOE_DISCOVERY_VERSION 0

libspdm_return_t pci_doe_init_requester()
{
Expand All @@ -17,7 +18,7 @@ libspdm_return_t pci_doe_init_requester()

data_object_protocol_size = sizeof(data_object_protocol);
status =
pci_doe_discovery (m_pci_doe_context, data_object_protocol, &data_object_protocol_size);
pci_doe_discovery (m_pci_doe_context, data_object_protocol, &data_object_protocol_size, DOE_DISCOVERY_VERSION);
if (LIBSPDM_STATUS_IS_ERROR(status)) {
return status;
}
Expand Down
Loading