Skip to content

Commit cb2e16a

Browse files
committed
Adding separate functionality for Persistent Operational keystore.
* Re-use the operational key-pair for multiple fabric. * Tested commissioning working with Test Harness.
1 parent ffb0052 commit cb2e16a

File tree

4 files changed

+577
-0
lines changed

4 files changed

+577
-0
lines changed

examples/lock-app/infineon/psoc6/src/AppTask.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
#if ENABLE_DEVICE_ATTESTATION
4949
#include <DeviceAttestationCredsExampleTrustM.h>
50+
#include <TrustMPersistentStorageOperationalKeystore.h>
5051
#endif
5152

5253
/* OTA related includes */
@@ -155,6 +156,14 @@ static void InitServer(intptr_t context)
155156
// Init ZCL Data Model
156157
static chip::CommonCaseDeviceServerInitParams initParams;
157158
(void) initParams.InitializeStaticResourcesBeforeServerInit();
159+
160+
#if ENABLE_DEVICE_ATTESTATION
161+
static chip::TrustMPersistentStorageOperationalKeystore sTrustMPersistentStorageOpKeystore;
162+
VerifyOrDie((sTrustMPersistentStorageOpKeystore.Init(initParams.persistentStorageDelegate)) == CHIP_NO_ERROR);
163+
initParams.operationalKeystore = &sTrustMPersistentStorageOpKeystore;
164+
#endif
165+
166+
158167
chip::Server::GetInstance().Init(initParams);
159168

160169
gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());

src/platform/Infineon/crypto/trustm/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static_library("infineon_crypto_lib") {
4444
"CHIPCryptoPALHsm_utils_trustm.cpp",
4545
"CHIPCryptoPAL_HostFallBack.cpp",
4646
"DeviceAttestationCredsExampleTrustM.cpp",
47+
"TrustMPersistentStorageOperationalKeystore.cpp",
4748
]
4849

4950
public_deps = [ ":public_headers" ]

0 commit comments

Comments
 (0)