Tom Cosgrove
e7a2230df7
Correctly build client-side code that's to be run under the PSA crypto sim
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:07:26 +01:00
Bence Szépkúti
c085cc767d
Merge pull request #9200 from davidhorstmann-arm/move-test-generation-files
...
Move test generation files to framework
2024-06-04 09:23:17 +00:00
David Horstmann
f6f3bcae43
Update file paths for moved files
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
David Horstmann
a7b0bb4de8
Move some test generation files to framework
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
Tom Cosgrove
30a9b6f2fc
Merge pull request #9198 from tom-cosgrove-arm/psa-sim-hashing
...
Test psa_hash_xxx() APIs in the PSA crypto simulator
2024-05-31 11:13:55 +00:00
Gilles Peskine
d961929615
Merge pull request #9155 from ttytm/fix-typo
...
fix typo
2024-05-30 17:24:55 +00:00
Gilles Peskine
c15544e217
Merge pull request #9088 from ronald-cron-arm/check-framework-files
...
Extend basic checks and C coding style check to framework files
2024-05-30 17:24:18 +00:00
Tom Cosgrove
0ca70d51d7
Add missing licences
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-30 11:12:22 +01:00
Tom Cosgrove
8bfb758e87
PSA crypto sim's server wrappers need to free deseraliased buffers when they're no longer needed
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 22:48:45 +01:00
Tom Cosgrove
ca0c147354
Mark temporary PSA crypto sim Perl scripts as executable
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 16:52:38 +01:00
Tom Cosgrove
e2f0e3012a
Extend PSA crypto simulator tests to run psa_hash.c under the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 15:19:27 +01:00
Tom Cosgrove
61ee59f041
Add the rest of the psa_hash_xxx() functions to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 15:19:27 +01:00
Tom Cosgrove
39f8b09f5b
Add PSA crypto sim serialisation functions needed for the remaining PSA hash APIs
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 15:19:27 +01:00
Tom Cosgrove
3ebb880f90
Hook the new psa_sim_crypto_{client,server} into the build and tests
...
- 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>
2024-05-29 15:19:10 +01:00
Tom Cosgrove
cb12604d55
Merge pull request #9191 from tom-cosgrove-arm/psa-sim-fixes
...
Some fixes to the PSA simulator
2024-05-29 12:31:05 +00:00
Tom Cosgrove
a4952f9450
The PSA sim logs aren't very many lines, so show them during tests
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 12:39:40 +01:00
Tom Cosgrove
54b4ccdbf8
Add PSA crypto sim client and server implementations of psa_hash_compute()
...
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>
2024-05-29 10:27:01 +01:00
Tom Cosgrove
e68fb72d8c
Add PSA crypto sim serialisation functions for rest of types needed for psa_hash_compute()
...
Still not used
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 10:04:14 +01:00
Tom Cosgrove
2fc5687b21
Add PSA crypto sim serialisation functions for basic types
...
Not hooked into the build yet
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 10:03:06 +01:00
Tom Cosgrove
92024566fb
Fix code style in psa_ff_server.c
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 09:58:56 +01:00
Bence Szépkúti
e3abb6a148
Merge pull request #9094 from davidhorstmann-arm/move-mbedtls-dev-to-framework
...
Move `mbedtls_dev` to framework submodule
2024-05-28 15:50:47 +00:00
Tom Cosgrove
38f6c86724
Remove unnecessary blank lines at top of functions in psa_ff_server.c
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Tom Cosgrove
9919543f5c
Only print PSA crypto sim server messages when DEBUG defined
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Tom Cosgrove
f69445ccaf
Fix sending a response of more than 184 bytes in psa_ff_server.c:psa_write()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Tom Cosgrove
bdc4c2d750
Fix PSA sim test awk script by removing extra $
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Tom Cosgrove
0a57a253cc
Fix psa_ff_server.c to calculate the amount of data from client correctly
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Tom Cosgrove
b7e5f31e2a
Replace final sprintf() with snprintf() in psa_ff_server.c
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Gilles Peskine
c7569a8c4b
Merge pull request #9159 from gilles-peskine-arm/analyze_outcomes-generate_files
...
Generate test data before coverage analysis
2024-05-23 12:08:15 +00:00
Ronald Cron
f5473a0260
Merge pull request #9057 from Ryan-Everett-arm/crypto-config-test_ref_configs
...
Update the reference configs to use `MBEDTLS_PSA_CRYPTO_CONFIG`
2024-05-23 05:58:55 +00:00
Gilles Peskine
2ad2f3207e
Pacify pylint
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-22 09:35:11 +02:00
Gilles Peskine
78ae4f6fe1
Generate test data before coverage analysis
...
Fixes #8300 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-21 20:26:18 +02:00
Tom Cosgrove
df1bfec990
Merge pull request #9121 from valeriosetti/issue8963
...
Add client-server build to all.sh
2024-05-20 07:14:37 +00:00
Turiiya
27098b458b
fix typo
...
Signed-off-by: Turiiya <34311583+ttytm@users.noreply.github.com>
2024-05-18 18:08:12 +02:00
Ronald Cron
b30cd3bb8f
Improve test-ref-configs.pl
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:34:11 +02:00
Valerio Setti
1f3c99c774
psa_autogen.py: improve management of output files
...
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>
2024-05-16 16:13:38 +02:00
Ronald Cron
1f95ede98c
Fix "maybe-uninitialized" warning with GCC 11.3
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
a33a824d8a
Resolve PBKDF2_AES_CMAC_PRF_128 dependencies
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
4dd6631aac
test-ref-configs.pl: Detect automatically test with USE_PSA enabled
...
Change the way we decide if for a given
configuration we need to run tests with
and without MBEDTLS_USE_PSA_CRYPTO enabled.
That makes the script suitable for 3.6 and
development branch.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
640276268d
Fix compat.sh filters
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Gilles Peskine
bdce65700e
Merge pull request #9067 from gilles-peskine-arm/ssl-opt-server2-detection
...
Fix skipped tests in configurations without RSA
2024-05-15 12:06:31 +00:00
Valerio Setti
87d99fbd6c
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>
2024-05-14 10:57:35 +02:00
Valerio Setti
dce6b85af8
psa_ff_client: fix typos and useless blank lines
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-14 10:43:14 +02:00
Valerio Setti
f57afd5acd
all.sh: improvements
...
- 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>
2024-05-14 10:39:20 +02:00
Gilles Peskine
fc73aa02b0
Add missing dependency that isn't autodetected
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:18:41 +02:00
Gilles Peskine
f5a30afdae
Remove redundant RSA dependency
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:18:28 +02:00
Gilles Peskine
d9c7be775e
Explicitly use TLS 1.2 on <=1.2-specific keyUsage/extKeyusage tests
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:17:35 +02:00
Gilles Peskine
f9f3d21a67
Fix PSK invocation: GnuTLS PSK length (more)
...
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>
2024-05-13 21:06:26 +02:00
David Horstmann
299e741e8e
Add mbedtls_framework to mypy checks
...
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>
2024-05-13 14:43:38 +01:00
David Horstmann
cd84bb287b
Update references to mbedtls_dev
...
Change these to point to the new mbedtls_framework module in the
framework submodule.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:43:29 +01:00
David Horstmann
1131318b72
Add framework/scripts to scripts_path.py
...
This allows test scripts to find the new mbedtls_framework module.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 13:48:13 +01:00