Skip to content

Commit cecc2e7

Browse files
AndreHeinemans-NXPxiaoxiang781216
authored andcommitted
controlse: add accesslib for the se05x secure element
1 parent fe12ad9 commit cecc2e7

28 files changed

+3335
-1495
lines changed

crypto/controlse/CMakeLists.txt

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ##############################################################################
2+
# apps/crypto/controlse/CMakeLists.txt
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
5+
# license agreements. See the NOTICE file distributed with this work for
6+
# additional information regarding copyright ownership. The ASF licenses this
7+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
8+
# use this file except in compliance with the License. You may obtain a copy of
9+
# the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
# License for the specific language governing permissions and limitations under
17+
# the License.
18+
#
19+
# ##############################################################################
20+
21+
if(CONFIG_CRYPTO_CONTROLSE)
22+
23+
set(MBEDTLS_DIR ${CMAKE_BINARY_DIR}/apps/include/mbedtls)
24+
25+
nuttx_add_application(
26+
NAME
27+
${CONFIG_CRYPTO_CONTROLSE_PROGNAME}
28+
STACKSIZE
29+
${CONFIG_CRYPTO_CONTROLSE_STACKSIZE}
30+
MODULE
31+
${CONFIG_CRYPTO_CONTROLSE}
32+
SRCS
33+
controlse_main.cxx
34+
chex_util.cxx
35+
csecure_element.cxx
36+
cstring.cxx
37+
ccertificate.cxx
38+
ccsr.cxx
39+
cpublic_key.cxx
40+
cserial_number.cxx
41+
csan_builder.cxx
42+
INCLUDE_DIRECTORIES
43+
${MBEDTLS_DIR})
44+
45+
endif()

crypto/controlse/Kconfig

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ config CRYPTO_CONTROLSE
1818
select MBEDTLS_X509_CSR_WRITE_C
1919
select MBEDTLS_X509_CRT_WRITE_C
2020
---help---
21-
Enable the controlse utility. This program is used control the
22-
secure element device
21+
Enable the controlse library and utility. It provides an
22+
access library to the secure element device. The utility can
23+
control the secure element device from the nuttx shell
2324

2425
if CRYPTO_CONTROLSE
2526

crypto/controlse/Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#
1919
############################################################################
2020

21+
# Copyright 2023, 2024 NXP
22+
2123
include $(APPDIR)/Make.defs
2224

2325
# controlse built-in application info
@@ -28,7 +30,8 @@ STACKSIZE = $(CONFIG_CRYPTO_CONTROLSE_STACKSIZE)
2830

2931
# controlse main source
3032

31-
MAINSRC = controlse_main.c
32-
CSRCS = x509_utils.c mbedtls_extension.c
33+
MAINSRC = controlse_main.cxx
34+
CXXSRCS = chex_util.cxx csecure_element.cxx cstring.cxx ccertificate.cxx\
35+
ccsr.cxx cpublic_key.cxx cserial_number.cxx csan_builder.cxx
3336

3437
include $(APPDIR)/Application.mk

0 commit comments

Comments
 (0)