Skip to content

Commit 55c8a16

Browse files
tomi-fontFlavio Ceolin
authored andcommitted
samples: tfm_integration: psa_crypto: improve the MbedTLS configuration
Move supported configuration items from the custom MbedTLS user configuration file over to the Kconfig overlay. The correct macros are then defined by the MbedTLS module according to the values of the Kconfig options. Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent 9bbff1a commit 55c8a16

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

samples/tfm_integration/psa_crypto/prj.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ CONFIG_MBEDTLS_HEAP_SIZE=32768
2828
CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y
2929
CONFIG_MBEDTLS_USER_CONFIG_FILE="user-tls-conf.h"
3030

31+
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
32+
CONFIG_MBEDTLS_ENTROPY_ENABLED=y
33+
CONFIG_MBEDTLS_ECP_C=y
34+
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
35+
CONFIG_MBEDTLS_ECDSA_C=y
36+
3137
# JSON
3238
CONFIG_JSON_LIBRARY=y
3339

samples/tfm_integration/psa_crypto/src/tls_config/user-tls-conf.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#define MBEDTLS_USE_PSA_CRYPTO
8-
#define MBEDTLS_PSA_CRYPTO_C
9-
10-
#define MBEDTLS_ENTROPY_C
11-
#define MBEDTLS_TEST_NULL_ENTROPY
12-
13-
#define MBEDTLS_ECP_C
14-
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
15-
#define MBEDTLS_ECDSA_C
16-
177
#define MBEDTLS_X509_CSR_WRITE_C
188
#define MBEDTLS_X509_CREATE_C
199
#define MBEDTLS_PEM_WRITE_C
2010
#define MBEDTLS_BASE64_C
21-
#define MBEDTLS_OID_C
22-
#define MBEDTLS_ASN1_WRITE_C
23-
#define MBEDTLS_PK_WRITE_C
24-
#define MBEDTLS_PK_C

0 commit comments

Comments
 (0)