Skip to content

Commit f21f8e2

Browse files
author
itayzafrir
committed
Support for slots to handles crypto API changes under SPM
1 parent 8d4be19 commit f21f8e2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

library/psa_crypto_slot_management.c

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

2828
#if defined(MBEDTLS_PSA_CRYPTO_C)
29+
/*
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.
34+
*/
35+
#if defined(MBEDTLS_PSA_CRYPTO_SPM)
36+
/*
37+
* PSA_CRYPTO_SECURE means that this file is compiled to the SPE side.
38+
* some headers will be affected by this flag.
39+
*/
40+
#define PSA_CRYPTO_SECURE 1
41+
#include "crypto_spe.h"
42+
#endif
2943

3044
#include "psa/crypto.h"
3145

0 commit comments

Comments
 (0)