mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-23 05:33:55 +08:00
tests: remove usage of MBEDTLS_NO_PLATFORM_ENTROPY
Use MBEDTLS_PLATFORM_GET_ENTROPY_ALT instead. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
405d4adff2
commit
73bd210a94
@ -211,7 +211,7 @@ static int run_test_snprintf(void)
|
|||||||
* back.
|
* back.
|
||||||
*/
|
*/
|
||||||
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_ENTROPY_C)
|
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_ENTROPY_C)
|
||||||
#if defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
#if defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_PLATFORM_GET_ENTROPY_ALT)
|
||||||
static void create_entropy_seed_file(void)
|
static void create_entropy_seed_file(void)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
@ -244,7 +244,7 @@ static void create_entropy_seed_file(void)
|
|||||||
|
|
||||||
static int mbedtls_entropy_self_test_wrapper(int verbose)
|
static int mbedtls_entropy_self_test_wrapper(int verbose)
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
#if defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_PLATFORM_GET_ENTROPY_ALT)
|
||||||
create_entropy_seed_file();
|
create_entropy_seed_file();
|
||||||
#endif
|
#endif
|
||||||
return mbedtls_entropy_self_test(verbose);
|
return mbedtls_entropy_self_test(verbose);
|
||||||
|
@ -88,7 +88,6 @@ EXCLUDE_FROM_FULL = frozenset([
|
|||||||
'MBEDTLS_MEMORY_DEBUG', # depends on MEMORY_BUFFER_ALLOC_C
|
'MBEDTLS_MEMORY_DEBUG', # depends on MEMORY_BUFFER_ALLOC_C
|
||||||
'MBEDTLS_NO_64BIT_MULTIPLICATION', # influences anything that uses bignum
|
'MBEDTLS_NO_64BIT_MULTIPLICATION', # influences anything that uses bignum
|
||||||
'MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES', # removes a feature
|
'MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES', # removes a feature
|
||||||
'MBEDTLS_NO_PLATFORM_ENTROPY', # removes a feature
|
|
||||||
'MBEDTLS_NO_UDBL_DIVISION', # influences anything that uses bignum
|
'MBEDTLS_NO_UDBL_DIVISION', # influences anything that uses bignum
|
||||||
'MBEDTLS_PSA_P256M_DRIVER_ENABLED', # influences SECP256R1 KeyGen/ECDH/ECDSA
|
'MBEDTLS_PSA_P256M_DRIVER_ENABLED', # influences SECP256R1 KeyGen/ECDH/ECDSA
|
||||||
'MBEDTLS_PLATFORM_NO_STD_FUNCTIONS', # removes a feature
|
'MBEDTLS_PLATFORM_NO_STD_FUNCTIONS', # removes a feature
|
||||||
@ -182,7 +181,7 @@ def baremetal_adapter(name, value, active):
|
|||||||
"""Config adapter for "baremetal"."""
|
"""Config adapter for "baremetal"."""
|
||||||
if not is_boolean_setting(name, value):
|
if not is_boolean_setting(name, value):
|
||||||
return active
|
return active
|
||||||
if name == 'MBEDTLS_NO_PLATFORM_ENTROPY':
|
if name == 'MBEDTLS_PLATFORM_GET_ENTROPY_ALT':
|
||||||
# No OS-provided entropy source
|
# No OS-provided entropy source
|
||||||
return True
|
return True
|
||||||
return include_in_full(name) and keep_in_baremetal(name)
|
return include_in_full(name) and keep_in_baremetal(name)
|
||||||
|
@ -64,7 +64,7 @@ doit()
|
|||||||
scripts/config.py unset MBEDTLS_NET_C || true
|
scripts/config.py unset MBEDTLS_NET_C || true
|
||||||
scripts/config.py unset MBEDTLS_TIMING_C || true
|
scripts/config.py unset MBEDTLS_TIMING_C || true
|
||||||
scripts/config.py unset MBEDTLS_FS_IO || true
|
scripts/config.py unset MBEDTLS_FS_IO || true
|
||||||
scripts/config.py --force set MBEDTLS_NO_PLATFORM_ENTROPY || true
|
scripts/config.py --force set MBEDTLS_PLATFORM_GET_ENTROPY_ALT || true
|
||||||
} >/dev/null 2>&1
|
} >/dev/null 2>&1
|
||||||
|
|
||||||
make clean >/dev/null
|
make clean >/dev/null
|
||||||
|
@ -121,7 +121,6 @@ class CoverageTask(outcome_analysis.CoverageTask):
|
|||||||
# Obsolete configuration options, to be replaced by
|
# Obsolete configuration options, to be replaced by
|
||||||
# PSA entropy drivers.
|
# PSA entropy drivers.
|
||||||
# https://github.com/Mbed-TLS/mbedtls/issues/8150
|
# https://github.com/Mbed-TLS/mbedtls/issues/8150
|
||||||
'Config: MBEDTLS_NO_PLATFORM_ENTROPY',
|
|
||||||
'Config: MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES',
|
'Config: MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES',
|
||||||
# Untested aspect of the platform interface.
|
# Untested aspect of the platform interface.
|
||||||
# https://github.com/Mbed-TLS/mbedtls/issues/9589
|
# https://github.com/Mbed-TLS/mbedtls/issues/9589
|
||||||
|
@ -26,7 +26,7 @@ component_build_no_sockets () {
|
|||||||
msg "build: full config except net_sockets.c, make, gcc -std=c99 -pedantic" # ~ 30s
|
msg "build: full config except net_sockets.c, make, gcc -std=c99 -pedantic" # ~ 30s
|
||||||
scripts/config.py full
|
scripts/config.py full
|
||||||
scripts/config.py unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
|
scripts/config.py unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
|
||||||
scripts/config.py set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux
|
scripts/config.py set MBEDTLS_PLATFORM_GET_ENTROPY_ALT # prevent syscall() on GNU/Linux
|
||||||
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O1 -std=c99 -pedantic' lib
|
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O1 -std=c99 -pedantic' lib
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,6 +106,3 @@ component_test_no_64bit_multiplication () {
|
|||||||
msg "test: MBEDTLS_NO_64BIT_MULTIPLICATION native" # ~ 10s
|
msg "test: MBEDTLS_NO_64BIT_MULTIPLICATION native" # ~ 10s
|
||||||
make test
|
make test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user