We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6d0842 commit 02a3488Copy full SHA for 02a3488
src/platform/Zephyr/ConfigurationManagerImpl.cpp
@@ -219,6 +219,13 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
219
for (uint32_t keyID = static_cast<uint32_t>(chip::Crypto::KeyIdBase::Minimum);
220
keyID <= static_cast<uint32_t>(chip::Crypto::KeyIdBase::Maximum); keyID++)
221
{
222
+#ifdef CONFIG_CHIP_CRYPTO_PSA_MIGRATE_DAC_PRIV_KEY
223
+ // Prevent from removing DAC Private Key
224
+ if (keyID == static_cast<uint32_t>(chip::Crypto::KeyIdBase::DACPrivKey))
225
+ {
226
+ continue;
227
+ }
228
+#endif
229
psa_destroy_key(static_cast<psa_key_id_t>(keyID));
230
}
231
#endif
0 commit comments