Skip to content

Commit

Permalink
Align NXP and Silabs platform to the recent OperationalKeystore changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekBalysNordic committed Jan 16, 2024
1 parent 0c02a02 commit 224e25a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
{
for (const FabricInfo & fabric : mFabrics)
{
if (CHIP_NO_ERROR !=
mOperationalKeystore->MigrateOpKeypairForFabric(fabric.GetFabricIndex(), persistentStorageOperationalKeystore))
err =
mOperationalKeystore->MigrateOpKeypairForFabric(fabric.GetFabricIndex(), persistentStorageOperationalKeystore);
if (CHIP_NO_ERROR != err && CHIP_ERROR_NOT_IMPLEMENTED != err)
{
ChipDeviceEvent event;
event.Type = DeviceEventType::kOperationalKeystoreMigrationFailed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ class K32W1PersistentStorageOpKeystore : public Crypto::OperationalKeystore
Crypto::P256ECDSASignature & outSignature) const override;
Crypto::P256Keypair * AllocateEphemeralKeypairForCASE() override;
void ReleaseEphemeralKeypair(Crypto::P256Keypair * keypair) override;
CHIP_ERROR ExportOpKeypairForFabric(FabricIndex fabricIndex, Crypto::P256SerializedKeypair & outKeypair) override
{
return CHIP_ERROR_NOT_IMPLEMENTED;
}
CHIP_ERROR MigrateOpKeypairForFabric(chip::FabricIndex, chip::Crypto::OperationalKeystore &) const override
{
return CHIP_ERROR_NOT_IMPLEMENTED;
}

protected:
void ResetPendingKey()
Expand Down
8 changes: 8 additions & 0 deletions src/platform/silabs/efr32/Efr32PsaOperationalKeystore.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ class Efr32PsaOperationalKeystore : public chip::Crypto::OperationalKeystore
chip::Crypto::P256ECDSASignature & outSignature) const override;
Crypto::P256Keypair * AllocateEphemeralKeypairForCASE() override;
void ReleaseEphemeralKeypair(chip::Crypto::P256Keypair * keypair) override;
CHIP_ERROR ExportOpKeypairForFabric(FabricIndex fabricIndex, Crypto::P256SerializedKeypair & outKeypair) override
{
return CHIP_ERROR_NOT_IMPLEMENTED;
}
CHIP_ERROR MigrateOpKeypairForFabric(chip::FabricIndex, chip::Crypto::OperationalKeystore &) const override
{
return CHIP_ERROR_NOT_IMPLEMENTED;
}

protected:
// The keymap maps PSA Crypto persistent key ID offsets against fabric IDs.
Expand Down

0 comments on commit 224e25a

Please sign in to comment.