Skip to content

Commit

Permalink
fix_ToT (#15931)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Nov 23, 2023
1 parent 2fd2de7 commit 4aca8b8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co
FabricIndex fabricIndex = 0;
Credentials::GroupDataProvider::KeySet keyset;

uint8_t compressed_fabric_id_buffer[sizeof(uint64_t)];
MutableByteSpan compressed_fabric_id(compressed_fabric_id_buffer);

emberAfPrintln(EMBER_AF_PRINT_DEBUG, "OpCreds: commissioner has added a NOC");

if (nullptr == groups)
Expand Down Expand Up @@ -582,7 +585,8 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co
keyset.policy = GroupKeyManagement::GroupKeySecurityPolicy::kTrustFirst;
keyset.num_keys_used = 1;
memcpy(keyset.epoch_keys[0].key, ipkValue.data(), Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES);
err = groups->SetKeySet(fabricIndex, keyset);
err = gFabricBeingCommissioned.GetCompressedId(compressed_fabric_id);
err = groups->SetKeySet(fabricIndex, compressed_fabric_id, keyset);
VerifyOrExit(err == CHIP_NO_ERROR, nocResponse = ConvertToNOCResponseStatus(err));

// We might have a new operational identity, so we should start advertising it right away.
Expand Down

0 comments on commit 4aca8b8

Please sign in to comment.