Also converts legacy symbols into their PSA equivalents.
When PSA is defined this does not change the compiled code
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
Convert legacy symbols to their PSA equivalents.
This does not change code compiled when this config is active with PSA
enabled
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
Also convert legacy symbols to their PSA equivalents.
This does not change code compiled when this config is active with PSA
enabled
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
Replaces legacy symbols with the PSA equivalents.
This doesn't change the code generated when this config is active
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
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 quotes to the $@ parameter in helper_crypto_client_build()
- instead of copying mbedtls_config.h to build static libraries,
we rely on the already existing backup/cleanup mechanism which
is available in all.sh.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Replace more sample PSK by longer (GnuTLS-compatible) strings, taking care
of keeping distinct PSK distinct for wrong-PSK tests.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This name is more descriptive of its purpose, since it actually adds
framework/scripts to the path rather than just framework/
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Since this python module resides in the framework submodule we must
add an extra explicit path to it for mypy.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This allows scripts in the scripts/ directory to get the path to the
mbedtls_framework module in framework/scripts/
Signed-off-by: David Horstmann <david.horstmann@arm.com>
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>
Move the generation of tests/src/test_certs.h and tests/src/test_keys.h
to the main CMakeLists.txt. This is required because these files are
needed both by tests and programs, whereas tests/CMakeLists.txt is only
included when ENABLE_TESTING is on.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
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>
This is necessary because otherwise the library is not able to
find the seedfile at runtime and it fails the initialization.
However since this test runs on a standard PC we can rely on
platform entropy as source of entropy.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit implements the first useful IPC communication between
the client and the server. The implemented command is simple,
psa_crypto_init(), and its return value is sent back to the client.
Note: the newly added file psa_functions_codes.h is temporary
and it's probably the one that needs to be automatically
generated by a python script to support all crypto functions.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Ensure that both server and client can call mbedtls_version_get_string_full()
to verify that they are linked against proper libraries.
Note: each side (client/server) performs the call against its own
MbedTLS library. There is no IPC communication involved in this
test. Client/server communication will come later.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
It includes changes to:
- tests/Makefile: build the library for client and server in different
folders. It mimica the libtestdriver1 behavior (without functions
renaming though).
- tests/scripts/all.sh: helper function to build for client and
server with some default configuration for each of them.
- crypto_spe.h: this is dummy file taken from the already existing
tests. It's just meant to pacify the compiler, not to provide
something useful. It will likely be changed in the future.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>