Skip to content

Commit 99974e3

Browse files
author
itayzafrir
committed
SPM integration update due to crypto API changes
When MBEDTLS_PSA_CRYPTO_SPM is defined, the code is being built for SPM (Secure Partition Manager) integration which separates the code into two parts: NSPE (Non-Secure Processing Environment) and SPE (Secure Processing Environment). When building for the SPE, an additional header file should be included.
1 parent 8d4be19 commit 99974e3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

library/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)