diff options
author | Tom Cosgrove <tom.cosgrove@arm.com> | 2024-06-10 13:43:41 +0100 |
---|---|---|
committer | Tom Cosgrove <tom.cosgrove@arm.com> | 2024-06-10 14:07:26 +0100 |
commit | e7a2230df7e9468f3a276edabe20a0705a492940 (patch) | |
tree | 9248b0398a0a1d2a65407891a863c1e3d8d8243d /tests | |
parent | 4ac0182caeaf913871c57e63e59d9afb86ba2682 (diff) | |
download | mbedtls-e7a2230df7e9468f3a276edabe20a0705a492940.zip mbedtls-e7a2230df7e9468f3a276edabe20a0705a492940.tar.gz mbedtls-e7a2230df7e9468f3a276edabe20a0705a492940.tar.bz2 |
Correctly build client-side code that's to be run under the PSA crypto sim
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/psa-client-server/psasim/Makefile | 4 | ||||
-rw-r--r-- | tests/psa-client-server/psasim/src/psa_sim_client_config_adjust.h | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/psa-client-server/psasim/Makefile b/tests/psa-client-server/psasim/Makefile index 06d3059..b9ec3ad 100644 --- a/tests/psa-client-server/psasim/Makefile +++ b/tests/psa-client-server/psasim/Makefile @@ -24,6 +24,8 @@ PSA_CLIENT_SRC = src/psa_ff_client.c \ src/psa_sim_crypto_client.c \ src/psa_sim_serialise.c +PSA_CLIENT_DEFS = -Isrc -DMBEDTLS_USER_CONFIG_FILE='"psa_sim_client_config_adjust.h"' + PARTITION_SERVER_BOOTSTRAP = src/psa_ff_bootstrap_TEST_PARTITION.c PSA_SERVER_SRC = $(PARTITION_SERVER_BOOTSTRAP) \ @@ -39,7 +41,7 @@ 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 $@ + $(CC) $(COMMON_INCLUDE) $(CFLAGS) $(PSA_CLIENT_DEFS) $(PSA_CLIENT_SRC) $(LIBPSACLIENT) $(LDFLAGS) -o $@ test/psa_partition: $(PSA_SERVER_SRC) $(GENERATED_H_FILES) test/seedfile $(CC) $(COMMON_INCLUDE) $(CFLAGS) $(PSA_SERVER_SRC) $(LIBPSASERVER) $(LDFLAGS) -o $@ diff --git a/tests/psa-client-server/psasim/src/psa_sim_client_config_adjust.h b/tests/psa-client-server/psasim/src/psa_sim_client_config_adjust.h new file mode 100644 index 0000000..3640c2a --- /dev/null +++ b/tests/psa-client-server/psasim/src/psa_sim_client_config_adjust.h @@ -0,0 +1,14 @@ +/** + * \file psa_sim_client_config_adjust.h + * + * \brief User config file for client-side code to be run under PSA simulator + */ + +/* + * Copyright The Mbed TLS Contributors + * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + */ + +#define MBEDTLS_PSA_CRYPTO_CLIENT +#undef MBEDTLS_PSA_CRYPTO_C +#undef MBEDTLS_PSA_CRYPTO_STORAGE_C |