Skip to content

Commit

Permalink
[EFR32] Destroy existing PSA key_id before re-using it.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs committed Aug 16, 2022
1 parent f61b60b commit 1f0e738
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/platform/EFR32/Efr32PsaOperationalKeystore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,6 @@ CHIP_ERROR Efr32PsaOperationalKeystore::NewOpKeypairForFabric(FabricIndex fabric

// Create new key on the old or found key ID
error = mPendingKeypair->Create(id, EFR32OpaqueKeyUsages::ECDSA_P256_SHA256);
if (error != CHIP_NO_ERROR)
{
// Try deleting and recreating this key since keys don't get wiped on factory erase yet
mPendingKeypair->Delete();
error = mPendingKeypair->Create(id, EFR32OpaqueKeyUsages::ECDSA_P256_SHA256);
}

if (error != CHIP_NO_ERROR)
{
ResetPendingKey();
Expand Down

0 comments on commit 1f0e738

Please sign in to comment.