From 901a0ca6583721640c8026d59c24e459db113bb9 Mon Sep 17 00:00:00 2001 From: Arkadiusz Balys Date: Mon, 22 Jan 2024 15:21:11 +0100 Subject: [PATCH] [nrf noup] Move initializing PSA to Application Initialize PSA in the Application side instead of Matter Server. --- src/app/server/Server.cpp | 4 ---- src/app/server/Server.h | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 3582312f09..4a0fa91f56 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -674,11 +674,7 @@ void Server::ResumeSubscriptions() Credentials::IgnoreCertificateValidityPeriodPolicy Server::sDefaultCertValidityPolicy; KvsPersistentStorageDelegate CommonCaseDeviceServerInitParams::sKvsPersistenStorageDelegate; -#if CHIP_CRYPTO_PSA -PSAOperationalKeystore CommonCaseDeviceServerInitParams::sPSAOperationalKeystore; -#else PersistentStorageOperationalKeystore CommonCaseDeviceServerInitParams::sPersistentStorageOperationalKeystore; -#endif Credentials::PersistentStorageOpCertStore CommonCaseDeviceServerInitParams::sPersistentStorageOpCertStore; Credentials::GroupDataProviderImpl CommonCaseDeviceServerInitParams::sGroupDataProvider; app::DefaultTimerDelegate CommonCaseDeviceServerInitParams::sTimerDelegate; diff --git a/src/app/server/Server.h b/src/app/server/Server.h index f71af57678..e574b52b15 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -41,11 +41,7 @@ #include #include #include -#if CHIP_CRYPTO_PSA -#include -#else #include -#endif #include #include #include @@ -218,14 +214,10 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams // PersistentStorageDelegate "software-based" operational key access injection if (this->operationalKeystore == nullptr) { -#if CHIP_CRYPTO_PSA - this->operationalKeystore = &sPSAOperationalKeystore; -#else // WARNING: PersistentStorageOperationalKeystore::Finish() is never called. It's fine for // for examples and for now. ReturnErrorOnFailure(sPersistentStorageOperationalKeystore.Init(this->persistentStorageDelegate)); this->operationalKeystore = &sPersistentStorageOperationalKeystore; -#endif } // OpCertStore can be injected but default to persistent storage default @@ -281,11 +273,7 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams private: static KvsPersistentStorageDelegate sKvsPersistenStorageDelegate; -#if CHIP_CRYPTO_PSA - static PSAOperationalKeystore sPSAOperationalKeystore; -#else static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore; -#endif static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static Credentials::GroupDataProviderImpl sGroupDataProvider; static chip::app::DefaultTimerDelegate sTimerDelegate;