Skip to content

Commit 901a0ca

Browse files
[nrf noup] Move initializing PSA to Application
Initialize PSA in the Application side instead of Matter Server.
1 parent 75b319c commit 901a0ca

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/app/server/Server.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,7 @@ void Server::ResumeSubscriptions()
674674
Credentials::IgnoreCertificateValidityPeriodPolicy Server::sDefaultCertValidityPolicy;
675675

676676
KvsPersistentStorageDelegate CommonCaseDeviceServerInitParams::sKvsPersistenStorageDelegate;
677-
#if CHIP_CRYPTO_PSA
678-
PSAOperationalKeystore CommonCaseDeviceServerInitParams::sPSAOperationalKeystore;
679-
#else
680677
PersistentStorageOperationalKeystore CommonCaseDeviceServerInitParams::sPersistentStorageOperationalKeystore;
681-
#endif
682678
Credentials::PersistentStorageOpCertStore CommonCaseDeviceServerInitParams::sPersistentStorageOpCertStore;
683679
Credentials::GroupDataProviderImpl CommonCaseDeviceServerInitParams::sGroupDataProvider;
684680
app::DefaultTimerDelegate CommonCaseDeviceServerInitParams::sTimerDelegate;

src/app/server/Server.h

-12
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@
4141
#include <credentials/PersistentStorageOpCertStore.h>
4242
#include <crypto/DefaultSessionKeystore.h>
4343
#include <crypto/OperationalKeystore.h>
44-
#if CHIP_CRYPTO_PSA
45-
#include <crypto/PSAOperationalKeystore.h>
46-
#else
4744
#include <crypto/PersistentStorageOperationalKeystore.h>
48-
#endif
4945
#include <inet/InetConfig.h>
5046
#include <lib/core/CHIPConfig.h>
5147
#include <lib/support/SafeInt.h>
@@ -218,14 +214,10 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams
218214
// PersistentStorageDelegate "software-based" operational key access injection
219215
if (this->operationalKeystore == nullptr)
220216
{
221-
#if CHIP_CRYPTO_PSA
222-
this->operationalKeystore = &sPSAOperationalKeystore;
223-
#else
224217
// WARNING: PersistentStorageOperationalKeystore::Finish() is never called. It's fine for
225218
// for examples and for now.
226219
ReturnErrorOnFailure(sPersistentStorageOperationalKeystore.Init(this->persistentStorageDelegate));
227220
this->operationalKeystore = &sPersistentStorageOperationalKeystore;
228-
#endif
229221
}
230222

231223
// OpCertStore can be injected but default to persistent storage default
@@ -281,11 +273,7 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams
281273

282274
private:
283275
static KvsPersistentStorageDelegate sKvsPersistenStorageDelegate;
284-
#if CHIP_CRYPTO_PSA
285-
static PSAOperationalKeystore sPSAOperationalKeystore;
286-
#else
287276
static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore;
288-
#endif
289277
static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore;
290278
static Credentials::GroupDataProviderImpl sGroupDataProvider;
291279
static chip::app::DefaultTimerDelegate sTimerDelegate;

0 commit comments

Comments
 (0)