tests: crypto: mbedtls: Remove local implementation of rand()

When MBEDTLS_RSA_C is defined, mbedtls define its local version of
rand() function.  Since we already have rand() in our minimal libc, we
can safely remove this.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit is contained in:
Yasushi SHOJI
2021-05-07 18:39:25 +09:00
committed by Christopher Friedt
parent b2fde24c4c
commit 5e535a8551
2 changed files with 1 additions and 14 deletions

View File

@@ -5,3 +5,4 @@ CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h"
CONFIG_MBEDTLS_TEST=y
CONFIG_ZTEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_MINIMAL_LIBC_RAND=y

View File

@@ -72,20 +72,6 @@
#include "mbedtls/memory_buffer_alloc.h"
#endif
#if defined(MBEDTLS_RSA_C)
int rand(void)
{
static ZTEST_DMEM uint32_t seed = 7U;
seed ^= seed << 13;
seed ^= seed >> 17;
seed ^= seed << 5;
return seed;
}
#endif
static int test_snprintf(size_t n, const char ref_buf[10], int ref_ret)
{
int ret;