Skip to content

Commit

Permalink
DeviceSecurityTestPkg: Update SpdmSetData to init req and res
Browse files Browse the repository at this point in the history
Signed-off-by: Wenxing Hou <[email protected]>
  • Loading branch information
Wenxing-hou authored and jyao1 committed Jan 29, 2024
1 parent c158bc0 commit 65d47cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,11 @@ CreateSpdmDriverContext (
Data16 = SPDM_ALGORITHMS_KEY_SCHEDULE_HMAC_HASH;
SpdmSetData (SpdmContext, SpdmDataKeySchedule, &Parameter, &Data16, sizeof (Data16));
Data8 = SPDM_ALGORITHMS_OPAQUE_DATA_FORMAT_1;
SpdmSetData (SpdmContext, SpdmDataOtherParamsSsupport, &Parameter, &Data8, sizeof (Data8));
SpdmSetData (SpdmContext, SpdmDataOtherParamsSupport, &Parameter, &Data8, sizeof (Data8));
Data8 = SPDM_MEL_SPECIFICATION_DMTF;
SpdmSetData (SpdmContext, SpdmDataMelSpec, &Parameter, &Data8, sizeof (Data8));
Data8 = 0x3F;
SpdmSetData (SpdmContext, SpdmDataLocalSupportedSlotMask, &Parameter, &Data8, sizeof (Data8));
IsRequrester = TRUE;
SpdmReturn = SpdmSetData (SpdmContext, LIBSPDM_DATA_IS_REQUESTER, &Parameter, &IsRequrester, sizeof (IsRequrester));
if (LIBSPDM_STATUS_IS_ERROR (SpdmReturn)) {
Expand Down
6 changes: 5 additions & 1 deletion DeviceSecurityTestPkg/Test/PciIoPciDoeStub/PciIoPciDoeStub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,11 @@ MainEntryPoint (
Data16 = SPDM_ALGORITHMS_KEY_SCHEDULE_HMAC_HASH;
SpdmSetData (SpdmContext, SpdmDataKeySchedule, &Parameter, &Data16, sizeof (Data16));
Data8 = SPDM_ALGORITHMS_OPAQUE_DATA_FORMAT_1;
SpdmSetData (SpdmContext, SpdmDataOtherParamsSsupport, &Parameter, &Data8, sizeof (Data8));
SpdmSetData (SpdmContext, SpdmDataOtherParamsSupport, &Parameter, &Data8, sizeof (Data8));
Data8 = SPDM_MEL_SPECIFICATION_DMTF;
SpdmSetData (SpdmContext, SpdmDataMelSpec, &Parameter, &Data8, sizeof (Data8));
Data8 = 0x3F;
SpdmSetData (SpdmContext, SpdmDataLocalSupportedSlotMask, &Parameter, &Data8, sizeof (Data8));

InitializeSpdmTest (&mSpdmTestDeviceContext);

Expand Down
6 changes: 5 additions & 1 deletion DeviceSecurityTestPkg/Test/SpdmStub/SpdmStub.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ MainEntryPoint (
Data16 = SPDM_ALGORITHMS_KEY_SCHEDULE_HMAC_HASH;
SpdmSetData (SpdmContext, SpdmDataKeySchedule, &Parameter, &Data16, sizeof (Data16));
Data8 = SPDM_ALGORITHMS_OPAQUE_DATA_FORMAT_1;
SpdmSetData (SpdmContext, SpdmDataOtherParamsSsupport, &Parameter, &Data8, sizeof (Data8));
SpdmSetData (SpdmContext, SpdmDataOtherParamsSupport, &Parameter, &Data8, sizeof (Data8));
Data8 = SPDM_MEL_SPECIFICATION_DMTF;
SpdmSetData (SpdmContext, SpdmDataMelSpec, &Parameter, &Data8, sizeof (Data8));
Data8 = 0x3F;
SpdmSetData (SpdmContext, SpdmDataLocalSupportedSlotMask, &Parameter, &Data8, sizeof (Data8));
IsRequrester = FALSE;
SpdmSetData (SpdmContext, LIBSPDM_DATA_IS_REQUESTER, &Parameter, &IsRequrester, sizeof (IsRequrester));

Expand Down

0 comments on commit 65d47cc

Please sign in to comment.