jyao1 / openspdm

This openspdm is a sample implementation for the DMTF SPDM specification.
Other
20 stars 22 forks source link

TestSpdmRequesterGetCertificateCase2 has assumption that the cert has 2 segments #78

Closed jyao1 closed 4 years ago

jyao1 commented 4 years ago

This function has assumption that the certificate chain has 2 segments. 1) in TestSpdmRequesterGetCertificateCase2() assert_int_equal (SpdmContext->Transcript.MessageB.BufferSize, sizeof(SPDM_GET_CERTIFICATE_REQUEST)2 + sizeof(SPDM_CERTIFICATE_RESPONSE)2 + DataSize);

2) in "case 0x2:" TempBufSize = sizeof(SPDM_CERTIFICATE_RESPONSE) + RemainderLength;

jyao1 commented 4 years ago

Similar issue in case 3, 6, 9, A.

jyao1 commented 4 years ago

Fixed all test cases