mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-01 09:10:03 +00:00
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>
This commit is contained in:
parent
dce6b85af8
commit
87d99fbd6c
@ -29,10 +29,13 @@ PSA_SERVER_SRC = $(PARTITION_SERVER_BOOTSTRAP) \
|
||||
|
||||
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 @@ clean:
|
||||
rm -rf include/psa_manifest
|
||||
rm -f test/psa_service_* test/psa_notify_*
|
||||
rm -r test/*.log
|
||||
rm test/seedfile
|
||||
|
||||
|
@ -968,12 +968,6 @@ helper_crypto_client_build() {
|
||||
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 "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user