Skip to content

Commit 1566267

Browse files
emargolispull[bot]
authored andcommitted
Updated CD Device Type Id field to 32-bits to match the spec change. (#11350)
1 parent 0cc8235 commit 1566267

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/credentials/CertificationDeclaration.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct CertificationElements
5151
uint16_t VendorId;
5252
uint16_t ProductIds[kMaxProductIdsCountPerCD];
5353
uint8_t ProductIdsCount;
54-
uint16_t DeviceTypeId;
54+
uint32_t DeviceTypeId;
5555
char CertificateId[kCertificateIdLength + 1];
5656
uint8_t SecurityLevel;
5757
uint16_t SecurityInformation;

src/credentials/tests/TestCertificationDeclaration.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ static void TestCD_EncodeDecode_Errors(nlTestSuite * inSuite, void * inContext)
218218
NL_TEST_ASSERT(inSuite, EncodeCertificationElements(sTestCMS_CertElements01, encodedCDPayload) == CHIP_ERROR_BUFFER_TOO_SMALL);
219219

220220
// Test Decode Error: CHIP_ERROR_INVALID_INTEGER_VALUE
221-
// Manually modified sTestCMS_CDContent01[]: updated DeviceTypeId element to 4-octet (0x25, 0x03, 0x34, 0x12, --> 0x26, 0x03,
222-
// 0x34, 0x12, 0xFF, 0xFF,)
221+
// Manually modified sTestCMS_CDContent01[]: updated VendorId element to 4-octet
222+
// (0x25, 0x01, 0xf1, 0xff, --> 0x26, 0x01, 0xf1, 0xff, 0xff, 0xff,)
223223
static constexpr uint8_t sTestCMS_CDContent01_Err01[] = {
224-
0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, 0x18, 0x26, 0x03, 0x34, 0x12, 0xFF,
225-
0xFF, 0x2c, 0x04, 0x13, 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x31, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30,
224+
0x15, 0x24, 0x00, 0x01, 0x26, 0x01, 0xf1, 0xff, 0xff, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, 0x18, 0x25, 0x03, 0x34,
225+
0x12, 0x2c, 0x04, 0x13, 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x31, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30,
226226
0x31, 0x2d, 0x32, 0x34, 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18
227227
};
228228

0 commit comments

Comments
 (0)