UnitTest/TestSpdmRequester/TestSpdmRequesterGetVersion.c
/**
  Test 13: receiving a VERSION message with wrong SPDM RequestResponseCode (in this
  case, GET_VERSION 0x84 instead of VERSION 0x04). The remaining data is a correct
  VERSION message, with available version 1.0 and 1.1.
  Expected behavior: client returns a Status of RETURN_DEVICE_ERROR.
**/
Test 13: receiving a VERSION message with wrong SPDM RequestResponseCode (in this
case, GET_VERSION 0x84 instead of VERSION 0x04). The remaining data is a correct
VERSION message, with available version 1.0 and 1.1.
Expected behavior: client returns a Status of RETURN_DEVICE_ERROR.
Test 13 : receiving a VERSION message with wrong SPDM RequestResponseCode ( in this case GET_VERSION 0x84 instead of VERSION 0x04 ) . The remaining data is a correct VERSION message with available version 1 . 0 and 1 . 1 . Expected behavior : client returns a Status of RETURN_DEVICE_ERROR .
void TestSpdmRequesterGetVersionCase13(void **state) {
  RETURN_STATUS        Status;
  SPDM_TEST_CONTEXT    *SpdmTestContext;
  SPDM_DEVICE_CONTEXT  *SpdmContext;
  SpdmTestContext = *state;
  SpdmContext = SpdmTestContext->SpdmContext;
  SpdmTestContext->CaseId = 0xD;
  Status = SpdmGetVersion (SpdmContext);
  assert_int_equal (Status, RETURN_DEVICE_ERROR);
}
void TestSpdmRequesterGetVersionCase13 ( void * * state ) { RETURN_STATUS Status ; SPDM_TEST_CONTEXT * SpdmTestContext ; SPDM_DEVICE_CONTEXT * SpdmContext ; SpdmTestContext = * state ; SpdmContext = SpdmTestContext -> SpdmContext ; SpdmTestContext -> CaseId = 0xD ; Status = SpdmGetVersion ( SpdmContext ) ; assert_int_equal ( Status , RETURN_DEVICE_ERROR ) ; }
Test 13: receiving a VERSION message with wrong SPDM RequestResponseCode (in this
case, GET_VERSION 0x84 instead of VERSION 0x04).
Test 13 : receiving a VERSION message with wrong SPDM RequestResponseCode ( in this case GET_VERSION 0x84 instead of VERSION 0x04 ) .