Simplify entropy seed injection configuration

Move NVSEED callbacks configuration to a header file
pull/9566/head
Alexander Zilberkant 2019-02-03 16:28:37 +02:00
parent 0622cc9865
commit 4a204015ac
2 changed files with 12 additions and 4 deletions

View File

@ -21,10 +21,20 @@
#ifndef __PLATFORM_MBED__H__
#define __PLATFORM_MBED__H__
#if defined(TARGET_PSA)
#if (defined(TARGET_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
#include "default_random_seed.h"
#if !defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO)
#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbed_default_seed_read
#endif
#if !defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO)
#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbed_default_seed_write
#endif
#endif // (defined(TARGET_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
#if DEVICE_TRNG
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#endif

View File

@ -7904,9 +7904,7 @@
"PSOC6_DYNSRM_DISABLE=1",
"MBEDTLS_PSA_CRYPTO_SPM",
"MBEDTLS_PSA_CRYPTO_C",
"MBEDTLS_ENTROPY_NV_SEED",
"MBEDTLS_PLATFORM_NV_SEED_READ_MACRO=mbed_default_seed_read",
"MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO=mbed_default_seed_write"
"MBEDTLS_ENTROPY_NV_SEED"
],
"deliver_to_target": "FUTURE_SEQUANA_PSA",
"overrides": {