mbedtls: Don't attempt to use default_random_seed

Don't attempt to use default_random_seed unless both PSA and Experimental API
support are enabled. This prevents errors when the Mbed TLS NV Seed feature is
being used on platforms that have PSA enabled by default, but not Experimental
API support by default.

    [DEBUG] Output: compilation terminated.
    [ERROR] In file included from ./mbed-os/connectivity/mbedtls/include/mbedtls/config.h:31,
                     from ./mbed-os/connectivity/mbedtls/include/mbedtls/entropy.h:28,
    ./mbed-os/connectivity/mbedtls/platform/inc/platform_mbed.h:26:10: fatal error: default_random_seed.h: No such file or directory
       26 | #include "default_random_seed.h"
pull/13791/head
Jaeden Amero 2020-10-20 13:44:20 +01:00
parent 376fda5bf5
commit 2300a56863
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@
#ifndef __PLATFORM_MBED__H__
#define __PLATFORM_MBED__H__
#if (defined(FEATURE_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
#if (defined(FEATURE_EXPERIMENTAL_API) && defined(FEATURE_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
#include "default_random_seed.h"