Fix mbedtls user config and null entropy

pull/2975/head
Andres AG 2016-10-05 10:58:19 +01:00 committed by Anna Bridge
parent b12b1bd312
commit c8256af85d
1 changed files with 20 additions and 15 deletions

View File

@ -37,23 +37,28 @@ add_code() {
# add an #ifndef to include config-no-entropy.h when the target does not have # add an #ifndef to include config-no-entropy.h when the target does not have
# an entropy source we can use. # an entropy source we can use.
add_code \ add_code \
"#ifndef MBEDTLS_CONFIG_H\n" \ "#ifndef MBEDTLS_CONFIG_H\n" \
"\n" \ "\n" \
"#include \"platform\/inc\/platform_mbed.h\"\n" \ "#include \"platform\/inc\/platform_mbed.h\"\n" \
"\n" \ "\n" \
"\/*\n" \ "\/*\n" \
" * Only use features that do not require an entropy source when\n" \ " * Only use features that do not require an entropy source when\n" \
" * DEVICE_ENTROPY_SOURCE is not defined in mbed OS.\n" \ " * DEVICE_ENTROPY_SOURCE is not defined in mbed OS.\n" \
" *\/\n" \ " *\/\n" \
"#if !defined(MBEDTLS_ENTROPY_HARDWARE_ALT)\n" \ "#if !defined(MBEDTLS_ENTROPY_HARDWARE_ALT) && !defined(MBEDTLS_TEST_NULL_ENTROPY)\n" \
"#include \"mbedtls\/config-no-entropy.h\"\n" \ "#include \"mbedtls\/config-no-entropy.h\"\n" \
"\n" \
"#if defined(MBEDTLS_USER_CONFIG_FILE)\n" \
"#include MBEDTLS_USER_CONFIG_FILE\n" \
"#endif\n" \
"\n" \
"#else\n" "#else\n"
add_code \ add_code \
"#include \"check_config.h\"\n" \ "#include \"check_config.h\"\n" \
"\n" \ "\n" \
"#endif \/* !MBEDTLS_ENTROPY_HARDWARE_ALT *\/" "#endif \/* !MBEDTLS_ENTROPY_HARDWARE_ALT && !MBEDTLS_TEST_NULL_ENTROPY *\/"
# not supported on mbed OS, nor used by mbed Client # not supported on mbed OS, nor used by mbed Client
conf unset MBEDTLS_NET_C conf unset MBEDTLS_NET_C