Skip to content

Commit 30e1816

Browse files
author
itayzafrir
committed
DO NOT CHERRY-PICK THIS!!! - mimics crypto function aliasing as in ARMmbed/mbed-crypto#16
This should be part of the mbed-crypto update into mbed-os!!!
1 parent 92d31f7 commit 30e1816

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@
2727

2828
#if defined(MBEDTLS_PSA_CRYPTO_C)
2929
/*
30-
* In case MBEDTLS_PSA_CRYPTO_SPM is defined the code is built for SPM (Secure
31-
* Partition Manager) integration which separate the code into two parts
32-
* NSPE (Non-Secure Process Environment) and SPE (Secure Process Environment).
33-
* In this mode an additional header file should be included.
30+
* When MBEDTLS_PSA_CRYPTO_SPM is defined, the code is being built for SPM
31+
* (Secure Partition Manager) integration which separates the code into two
32+
* parts: NSPE (Non-Secure Processing Environment) and SPE (Secure Processing
33+
* Environment). When building for the SPE, an additional header file should be
34+
* included.
3435
*/
3536
#if defined(MBEDTLS_PSA_CRYPTO_SPM)
3637
/*
37-
* PSA_CRYPTO_SECURE means that this file is compiled to the SPE side.
38-
* some headers will be affected by this flag.
38+
* PSA_CRYPTO_SECURE means that this file is compiled for the SPE.
39+
* Some headers will be affected by this flag.
3940
*/
4041
#define PSA_CRYPTO_SECURE 1
4142
#include "crypto_spe.h"

features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@
2626
#endif
2727

2828
#if defined(MBEDTLS_PSA_CRYPTO_C)
29+
/*
30+
* When MBEDTLS_PSA_CRYPTO_SPM is defined, the code is being built for SPM
31+
* (Secure Partition Manager) integration which separates the code into two
32+
* parts: NSPE (Non-Secure Processing Environment) and SPE (Secure Processing
33+
* Environment). When building for the SPE, an additional header file should be
34+
* included.
35+
*/
36+
#if defined(MBEDTLS_PSA_CRYPTO_SPM)
37+
/*
38+
* PSA_CRYPTO_SECURE means that this file is compiled for the SPE.
39+
* Some headers will be affected by this flag.
40+
*/
41+
#define PSA_CRYPTO_SECURE 1
42+
#include "crypto_spe.h"
43+
#endif
2944

3045
#include "psa/crypto.h"
3146

0 commit comments

Comments
 (0)