Skip to content

Commit 4b58b55

Browse files
committed
Add missing guards
1 parent ac586ce commit 4b58b55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* This file is part of mbed TLS (https://tls.mbed.org)
2020
*/
2121

22+
#if defined(MBEDTLS_PSA_CRYPTO_C)
23+
2224
#include <stdlib.h>
2325
#include <string.h>
2426
#include "psa_psa_f_ifs.h"
@@ -917,7 +919,7 @@ psa_status_t psa_generate_random( uint8_t *output,
917919
return( ( psa_status_t ) err_call );
918920
}
919921

920-
#if defined(MBEDTLS_ENTROPY_NV_SEED)
922+
#if ( defined(MBEDTLS_ENTROPY_NV_SEED) && defined(MBEDTLS_PSA_HAS_ITS_IO) )
921923
/****************************************************************/
922924
/* PSA_ENTROPY_INJECT */
923925
/****************************************************************/
@@ -1227,3 +1229,5 @@ void mbedtls_psa_crypto_free( void )
12271229
psa_call( handle, NULL, 0, NULL, 0 );
12281230
psa_close( handle );
12291231
}
1232+
1233+
#endif /* MBEDTLS_PSA_CRYPTO_C */

0 commit comments

Comments
 (0)