Skip to content

Commit b997c40

Browse files
authored
[NXP] fix EL2GO commissioning issue (project-chip#39181)
Signed-off-by: Martin Girardot <[email protected]>
1 parent db4749b commit b997c40

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/platform/nxp/rt/rw61x/FactoryDataProviderEl2GoImpl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign
215215
uint8_t hash[MCUXCLHASH_OUTPUT_SIZE_SHA_256] = { 0 };
216216
mcuxClEls_KeyIndex_t key_index = MCUXCLELS_KEY_SLOTS;
217217
mcuxClEls_EccByte_t ecc_signature[MCUXCLELS_ECC_SIGNATURE_SIZE];
218-
uint8_t digest[kSHA256_Hash_Length];
219218
uint16_t BlobSize = 0;
220219
uint16_t KeyIdSize = 0;
221220
uint32_t Addr;
@@ -227,8 +226,7 @@ CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign
227226
SearchForId(FactoryDataId::kEl2GoDacKeyId, (uint8_t *) &el2go_dac_key_id, sizeof(el2go_dac_key_id), KeyIdSize));
228227

229228
/* Calculate message HASH to sign */
230-
memset(&digest[0], 0, sizeof(digest));
231-
res = Hash_SHA256(digestToSign.data(), digestToSign.size(), &digest[0]);
229+
res = Hash_SHA256(digestToSign.data(), digestToSign.size(), &hash[0]);
232230
if (res != CHIP_NO_ERROR)
233231
{
234232
return res;

0 commit comments

Comments
 (0)