psasim: create a seedfile to be used for the crypto server
This allows to re-enable MBEDTLS_ENTROPY_NV_SEED since the
seedfile is correctly found in the "test" folder at runtime.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/tests/psa-client-server/psasim/Makefile b/tests/psa-client-server/psasim/Makefile
index 01e3486..396f5ad 100644
--- a/tests/psa-client-server/psasim/Makefile
+++ b/tests/psa-client-server/psasim/Makefile
@@ -29,10 +29,13 @@
all: $(TEST_BIN)
+test/seedfile:
+ dd if=/dev/urandom of=./test/seedfile bs=64 count=1
+
test/psa_client: $(PSA_CLIENT_SRC) $(GENERATED_H_FILES)
$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(PSA_CLIENT_SRC) $(LIBPSACLIENT) $(LDFLAGS) -o $@
-test/psa_partition: $(PSA_SERVER_SRC) $(GENERATED_H_FILES)
+test/psa_partition: $(PSA_SERVER_SRC) $(GENERATED_H_FILES) test/seedfile
$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(PSA_SERVER_SRC) $(LIBPSASERVER) $(LDFLAGS) -o $@
$(PARTITION_SERVER_BOOTSTRAP) $(GENERATED_H_FILES): src/manifest.json src/server.c
@@ -56,4 +59,5 @@
rm -rf include/psa_manifest
rm -f test/psa_service_* test/psa_notify_*
rm -r test/*.log
+ rm test/seedfile
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index fbe9523..6ce0fa9 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -968,12 +968,6 @@
scripts/config.py crypto_full
scripts/config.py unset MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS
scripts/config.py set MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER
- # scripts/config.py set MBEDTLS_PSA_CRYPTO_SPM
- # Disable NV_SEED as the MBEDTLS_PLATFORM_STD_NV_SEED_FILE is not in
- # right path for mbedtls_platform_std_nv_seed_read(). Just rely on
- # mbedtls_platform_entropy_poll() as entropy source().
- scripts/config.py unset MBEDTLS_ENTROPY_NV_SEED
- scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT
fi
make -C tests/psa-client-server/psasim/ CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" $TARGET_LIB "$@"