Skip to content

Commit 3e99dc7

Browse files
luoji-nxp“nxf90552”
authored and
“nxf90552”
committed
Support ele backed operational keystore
Support the ELE (EdgeLock Enclave) backed persistent storage operation keystore. It's availble for i.MX 93 only. Change-Id: Id9e624040c57f80d9cc84511cf9a28c01084a60d Signed-off-by: Ji Luo <ji.luo@nxp.com> Reviewed-on: http://androidsource.nxp.com/project/22450 Reviewed-by: Elven Wang <elven.wang@nxp.com> Reviewed-on: http://androidsource.nxp.com/project/23010
1 parent 9788dc5 commit 3e99dc7

File tree

12 files changed

+949
-4
lines changed

12 files changed

+949
-4
lines changed

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,7 @@
357357
[submodule "third_party/libtrustymatter/repo"]
358358
path = third_party/libtrustymatter/repo
359359
url = https://github.com/nxp-imx/libtrustymatter
360+
[submodule "repo"]
361+
path = third_party/imx-secure-enclave/repo
362+
url = https://github.com/nxp-imx/imx-secure-enclave.git
363+
branch = lf-6.12.3_1.0.0

examples/platform/linux/AppMain.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ using namespace chip::Credentials::Trusty;
136136
using namespace chip::Trusty;
137137
#endif
138138

139+
#if CHIP_OP_KEYSTORE_ELE
140+
#include "PersistentStorageOperationalKeystoreEle.h"
141+
using namespace chip::ele;
142+
#endif
143+
139144
using namespace chip;
140145
using namespace chip::ArgParser;
141146
using namespace chip::Credentials;
@@ -571,6 +576,11 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl)
571576
initParams.operationalKeystore = &sPersistentStorageOperationalKeystore;
572577
#endif
573578

579+
#if CHIP_OP_KEYSTORE_ELE
580+
static chip::ele::PersistentStorageOperationalKeystoreEle sPersistentStorageOperationalKeystore;
581+
initParams.operationalKeystore = &sPersistentStorageOperationalKeystore;
582+
#endif
583+
574584
#if defined(ENABLE_CHIP_SHELL)
575585
Engine::Root().Init();
576586
Shell::RegisterCommissioneeCommands();

examples/platform/linux/BUILD.gn

+18
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import("${chip_root}/src/lib/core/core.gni")
2020
import("${chip_root}/src/lib/lib.gni")
2121
import("${chip_root}/src/tracing/tracing_args.gni")
2222
import("${chip_root}/src/lib/trusty.gni")
23+
import("${chip_root}/src/lib/imx_ele.gni")
2324

2425
if (current_os != "nuttx") {
2526
import("//build_overrides/jsoncpp.gni")
@@ -106,6 +107,13 @@ source_set("app-main") {
106107
]
107108
}
108109

110+
if (chip_with_imx_ele == 1) {
111+
sources += [
112+
"PersistentStorageOperationalKeystoreEle.cpp",
113+
"PersistentStorageOperationalKeystoreEle.h",
114+
]
115+
}
116+
109117
public_deps = [
110118
":boolean-state-configuration-test-event-trigger",
111119
":commissioner-main",
@@ -136,6 +144,10 @@ source_set("app-main") {
136144
public_deps += [ "${chip_root}/third_party/libtrustymatter" ]
137145
}
138146

147+
if (chip_with_imx_ele == 1) {
148+
public_deps += [ "${chip_root}/third_party/imx-secure-enclave:libelematter" ]
149+
}
150+
139151
if (chip_with_trusty_os == 1) {
140152
defines += [ "CHIP_ATTESTATION_TRUSTY_OS=1" ]
141153
} else {
@@ -148,6 +160,12 @@ source_set("app-main") {
148160
defines += [ "CHIP_OP_KEYSTORE_TRUSTY_OS=0" ]
149161
}
150162

163+
if (chip_with_imx_ele == 1) {
164+
defines += [ "CHIP_OP_KEYSTORE_ELE=1" ]
165+
} else {
166+
defines += [ "CHIP_OP_KEYSTORE_ELE=0" ]
167+
}
168+
151169
if (chip_enable_pw_rpc) {
152170
defines += [ "PW_RPC_ENABLED" ]
153171
}

0 commit comments

Comments
 (0)