- always print ERROR and FATAL messages because they should never
occur, but when they do it's important to see them immediately;
- keep INFO prints under DEBUG guard;
- set client's PRINT as INFO message because otherwise it will
mess test_suites's output;
- change some error messages from INFO to ERROR because that's
what they are.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
When the client disconnects the server can clean operations slots
so that upcoming clients will not hit the maximum slot limit
(at least it's very unlikely to happen for normal clients).
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Reduce server's ping time for messages from 50ms to 1us because
otherwise tests suites will take forever to execute.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This allows to keep the same CONFIG_H while building the Mbed TLS
library and the application (no matter if it's client or server).
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
CRYPTO_C must or must-not be enabled on client and server
sides as follows:
- if it's enabled while building the client side it's a failure;
- it it's NOT enabled while building the server it's a failure.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
- smoke test client.c becomes a trivial call to psa_crypto_init()
- server.c now uses psa_sim_crypto_server.c's psa_crypto_call()
- Makefile is updated to build all the modules, and allow a different MAIN
- all.sh's test_psasim now tests the simulation of psa_hash_compute() too
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
A Perl script that creates them is also included as reference. This is not the
final script (that will be in Python) but a proof-of-concept to show that
creaation client and server wrappers can be scripted.
It is not hooked into the build: it must be run manually. It is not part of the
deliverables for this PR.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
While at this, fix also Makefile so that "make clean" does not
complain if some of the files to be cancelled do not exist.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
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>
Add DEBUG=1 in test_psasim() to helpers and final make to build
the libraries and the final binaries with debug symbols
enabled.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Instead of copying the entire library & include folders twice
to build libraries for client and server:
- change the main config file (mbedtls_config.h)
- build in the root library folder
- move the generated library in the psasim folder
- use those library for linking the client/server binaries
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
The goal is to keep psasim as simple as possible:
- do not build a separate lib for psa-ff; build those source
files as part of server or client
- do not have lot of different makefiles: just 1 that does all
we need
- do not have several subfolders for headers: only 1 is enough
for this kind of project
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>