Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions samples/matter/common/src/app/matter_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ app::Clusters::NetworkCommissioning::InstanceAndDriver<NetworkCommissioning::Gen
sThreadNetworkDriver(0 /*endpointId*/);
#endif

#ifdef CONFIG_CHIP_CRYPTO_PSA
chip::Crypto::PSAOperationalKeystore Nrf::Matter::InitData::sOperationalKeystoreDefault{};
#endif

#ifdef CONFIG_CHIP_STORE_KEYS_IN_KMU
#if defined(CONFIG_CHIP_STORE_KEYS_IN_KMU)
chip::DeviceLayer::KMUOperationalKeystore Nrf::Matter::InitData::sKMUOperationalKeystoreDefault{};
chip::DeviceLayer::KMUSessionKeystore Nrf::Matter::InitData::sKMUSessionKeystoreDefault{};
#elif defined(CONFIG_CHIP_CRYPTO_PSA)
chip::Crypto::PSAOperationalKeystore Nrf::Matter::InitData::sOperationalKeystoreDefault{};
#endif

#ifdef CONFIG_CHIP_FACTORY_DATA
Expand Down Expand Up @@ -329,6 +328,7 @@ void DoInitChipServer(intptr_t /* unused */)
static KMUKeyAllocator kmuAllocator;
Crypto::SetPSAKeyAllocator(&kmuAllocator);
sLocalInitData.mServerInitParams->sessionKeystore = sLocalInitData.mSessionKeystore;
sLocalInitData.mServerInitParams->operationalKeystore = sLocalInitData.mOperationalKeyStore;
#endif

VerifyOrReturn(sLocalInitData.mServerInitParams, LOG_ERR("No valid server initialization parameters"));
Expand Down
28 changes: 14 additions & 14 deletions samples/matter/common/src/app/matter_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
#include <platform/nrfconnect/wifi/NrfWiFiDriver.h>
#endif

#ifdef CONFIG_CHIP_CRYPTO_PSA
#include <crypto/PSAOperationalKeystore.h>
#endif

#ifdef CONFIG_CHIP_STORE_KEYS_IN_KMU
#if defined(CONFIG_CHIP_STORE_KEYS_IN_KMU)
#include <platform/nrfconnect/KMUOperationalKeystore.h>
#include <platform/nrfconnect/KMUSessionKeystore.h>
#elif defined(CONFIG_CHIP_CRYPTO_PSA)
#include <crypto/PSAOperationalKeystore.h>
#endif

#ifdef CONFIG_CHIP_FACTORY_DATA
Expand Down Expand Up @@ -60,14 +59,15 @@ struct InitData {
/** @brief Pointer to the user provided FactoryDataProvider implementation. */
chip::DeviceLayer::FactoryDataProviderBase *mFactoryDataProvider{ &sFactoryDataProviderDefault };
#endif
#ifdef CONFIG_CHIP_CRYPTO_PSA
#if defined(CONFIG_CHIP_STORE_KEYS_IN_KMU)
/** @brief Pointer to the user provided OperationalKeystore implementation. */
chip::Crypto::OperationalKeystore *mOperationalKeyStore{ &sOperationalKeystoreDefault };
#endif
#ifdef CONFIG_CHIP_STORE_KEYS_IN_KMU
chip::Crypto::OperationalKeystore *mOperationalKeyStore{ &sKMUOperationalKeystoreDefault };
/** @brief Pointer to the user provided SessionKeystore implementation. */
chip::Crypto::SessionKeystore *mSessionKeystore{ &sKMUSessionKeystoreDefault };
#endif
#elif defined(CONFIG_CHIP_CRYPTO_PSA)
/** @brief Pointer to the user provided OperationalKeystore implementation. */
chip::Crypto::OperationalKeystore *mOperationalKeyStore{ &sOperationalKeystoreDefault };
#endif //
/** @brief Custom code to execute in the Matter main event loop before the server initialization. */
CustomInit mPreServerInitClbk{ nullptr };
/** @brief Custom code to execute in the Matter main event loop after the server initialization. */
Expand All @@ -83,11 +83,11 @@ struct InitData {
static chip::DeviceLayer::FactoryDataProvider<chip::DeviceLayer::InternalFlashFactoryData>
sFactoryDataProviderDefault;
#endif
#ifdef CONFIG_CHIP_CRYPTO_PSA
static chip::Crypto::PSAOperationalKeystore sOperationalKeystoreDefault;
#endif
#ifdef CONFIG_CHIP_STORE_KEYS_IN_KMU
#if defined(CONFIG_CHIP_STORE_KEYS_IN_KMU)
static chip::DeviceLayer::KMUSessionKeystore sKMUSessionKeystoreDefault;
static chip::DeviceLayer::KMUOperationalKeystore sKMUOperationalKeystoreDefault;
#elif defined(CONFIG_CHIP_CRYPTO_PSA)
static chip::Crypto::PSAOperationalKeystore sOperationalKeystoreDefault;
#endif
static chip::DeviceLayer::DeviceInfoProviderImpl sDeviceInfoProviderDefault;
};
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ manifest:
- name: matter
repo-path: sdk-connectedhomeip
path: modules/lib/matter
revision: fe650a3ee4948ef1a2edd55a7fe4f6eb561c9e64
revision: pull/640/head
west-commands: scripts/west/west-commands.yml
submodules:
- name: nlio
Expand Down
Loading