Skip to content

Commit

Permalink
remove coments
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekBalysNordic committed Jan 3, 2024
1 parent 571792b commit 05d484a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/platform/nrfconnect/FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,6 @@ CHIP_ERROR FactoryDataProvider<FlashFactoryData>::MoveDACPrivateKeyToSecureStora
}

#ifdef CONFIG_CHIP_CRYPTO_PSA_MIGRATE_DAC_PRIV_KEY

// Allocate needed memory space to perform removal and moving DAC private key
// size_t alignedSize = ROUND_UP(mFactoryData.actualSize, flashParameters->write_block_size);
// chip::Platform::ScopedMemoryBuffer<uint8_t> factoryDataBuff;
// VerifyOrReturnError(factoryDataBuff.Calloc(alignedSize), CHIP_ERROR_NO_MEMORY);

// // Overwrite the DAC private key
// memcpy(factoryDataBuff.Get() + mFactoryData.dacPrivateKeyOffset, clearedDACPrivKey, kDACPrivateKeyLength);

// Replace the old factory data set with the new one, we can write directly zeros to the FLASH to remove DAC key,
// but it can be performed only twice without erasing the memory page.
// Moreover the dacPrivateKeyOffset must be aligned to the block size.

// Get the actual block size.
const flash_parameters * flashParameters = flash_get_parameters(kFlashDev);
VerifyOrReturnError(flashParameters, CHIP_ERROR_INTERNAL);
Expand Down

0 comments on commit 05d484a

Please sign in to comment.