Tom Cosgrove
d32fac276d
psasim: have the generator script check for type = "void" rather than name = "(void)"
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:03:01 +02:00
Tom Cosgrove
4d8d5569d8
psasim: add support for psa_reset_key_attributes()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:10 +02:00
Tom Cosgrove
feb021695a
psasim: add support for psa_copy_key()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:10 +02:00
Tom Cosgrove
05c99e13e6
psasim: add support for psa_{sign,verify}_hash_xxx() and get/set max ops
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:09 +02:00
Tom Cosgrove
9b10cf7e39
psasim: add support for PSA functions that return uint32_t or void
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:08 +02:00
Tom Cosgrove
1a8b805cf5
psasim: add support for key functions that don't need psa_key_attributes_t
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:08 +02:00
Tom Cosgrove
8f1c913e38
psasim: add support for psa_asymmetric_{encrypt,decrypt}() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:07 +02:00
Tom Cosgrove
6add43aac8
psasim: add support for psa_{sign,verify}_{message,hash}() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:06 +02:00
Tom Cosgrove
5d4b9cb2e2
psasim: add support for psa_generate_key*() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:06 +02:00
Tom Cosgrove
c3236b85da
psasim: add support for psa_key_derivation_xxx() and psa_raw_key_agreement() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:05 +02:00
Tom Cosgrove
623fcb37d6
psasim: add the ability to serialise psa_key_production_parameters_t
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:04 +02:00
Tom Cosgrove
a2d81c9fb6
psasim: psa_key_derivation_verify_bytes() doesn't follow the naming convention for a buffer, so override
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:04 +02:00
Tom Cosgrove
c6d2e768d6
psasim: use ser_params and ser_result variable names in client; 'params' is needed by some PSA functions
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:03 +02:00
Tom Cosgrove
55b62dab75
psasim: skip some functions; see _SKIP_FUNCTIONS in generate_psa_wrappers.py
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:02 +02:00
Tom Cosgrove
a4eac4a84d
psasim: add support for psa_cipher_xxx() functions
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:02 +02:00
Tom Cosgrove
853ca0cdb0
psasim: add support for psa_mac_xxx() functions
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:01 +02:00
Tom Cosgrove
baace2f7ba
psasim: add support for psa_generate_random()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:01:29 +02:00
Thomas Daubney
0d915a90ea
Remove final references to padlock
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-20 16:45:51 +01:00
Thomas Daubney
6a758fc7a1
Add guarding to aes_maybe_realign
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-20 16:43:20 +01:00
Elena Uziunaite
1b6fb219e9
Replace MBEDTLS_MD_CAN_RIPEMD160 with PSA_WANT_ALG_RIPEMD160
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-06-20 16:35:29 +01:00
Gilles Peskine
7f900690e0
Update generate_config_tests.py
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:13:32 +02:00
Gilles Peskine
ef822c1656
Add some missing handling for generated test_suite_config.*.data
...
Fixes the files not being generated in the build tree.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:12:51 +02:00
Gilles Peskine
8637058384
Anchor relative paths
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:12:51 +02:00
Gilles Peskine
a7469d3e8c
Driver vs referenee: ignore relevant configuration differences
...
The driver-vs-reference checks compare test results in different
configurations. Ignore the test results that report differences in
configurations that were the point of the comparison. Do compare other
configuration reports: this will let us know if the configurations diverge
in an unexpected way.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:12:51 +02:00
Gilles Peskine
e154e6fe51
Generate config test cases for single options
...
Generate option-on and option-off cases for test_suite_config, for all
boolean options (MBEDTLS_xxx and PSA_WANT_xxx, collected from the mbedtls
and PSA config files).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:12:48 +02:00
Gilles Peskine
ada30fe650
New test suite to report configuration options
...
Add a test suite intended to report configuration options in the outcome
file: we're only interested in SKIP vs PASS.
Add a few test cases for some interesting combinations of options. The
selection here is just for illustration purposes, more will be added later.
A subsequent commit will automatically generate test cases for single options.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:10:24 +02:00
Gilles Peskine
b0aa75e7cc
Clean up generated files enumeration
...
Avoid having to list multiple generation scripts on the same line.
No intended semantic change.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:10:24 +02:00
Gilles Peskine
9ba9c21c61
Recognize that a double-inclusion guard is not a config setting
...
Fix PSA_CRYPTO_CONFIG_H being treated as a configuration setting in
include/psa/crypto_config.h.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:10:24 +02:00
Valerio Setti
19efa3d016
changelog: add changelog
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-20 11:06:25 +02:00
Manuel Pégourié-Gonnard
2a674bd9ce
Merge pull request #9251 from gabor-mezei-arm/update_test_full_no_cipher_no_psa_crypto
...
Resolve to run the legacy only test cases with `PSA_WANT` macros
2024-06-20 08:06:25 +00:00
Ronald Cron
b876a0a13e
Merge pull request #9185 from ronald-cron-arm/adapt-components-with-psa-crypto-config-enabled
...
Adapt components with MBEDTLS_PSA_CRYPTO_CONFIG enabled
2024-06-19 13:24:14 +00:00
Ronald Cron
390dba6a8f
Update framework submodule to the merge of PR22
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 13:47:44 +02:00
Tom Cosgrove
150b88c9d2
Merge pull request #9280 from valeriosetti/psasim-reset-slots-on-disconnection
...
psasim-server: add function to reset operations slots
2024-06-19 11:10:52 +01:00
Tom Cosgrove
125440d344
Merge pull request #9278 from valeriosetti/fix-psasim-logs
...
psa_sim: improve log prints
2024-06-19 11:03:05 +01:00
Ronald Cron
0417a2c746
Adapt component_test_when_no_ciphersuites_have_mac
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:45:01 +02:00
Ronald Cron
cd33cd6abf
test_when_no_ciphersuites_have_mac: Fix logs
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:24:32 +02:00
Ronald Cron
cfce75f4c4
Remove component_test_full_no_bignum
...
Remove test_full_no_bignum as duplicate
of the test of the reference config
confgi-symmetric-only.h and
component_test_psa_crypto_config_accel_ecc_no_bignum().
Specifically, component_test_full_no_bignum was
added as part of preparation work for that component.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:24:32 +02:00
Ronald Cron
7062d3d936
tests: src: Fix PSA test wrappers for PAKE
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:24:28 +02:00
Ronald Cron
8dbea48958
Adapt test_full_no_cipher_ components
...
Adapt test_full_no_cipher_ components with
MBEDTLS_PSA_CRYPTO_CONFIG enabled.
Remove the component with no PSA crypto and
the one with MBEDTLS_PSA_CRYPTO_CONFIG disabled.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:13:52 +02:00
Ronald Cron
a67f1beb46
Adapt test_crypto_full_md_light_only
...
Adapt test_crypto_full_md_light_only with
MBEDTLS_PSA_CRYPTO_CONFIG enabled.
No need to disable PSA_WANT_ALG_HKDF as
the PSA implementation of HKDF is independent
of hkdf.c and thus of MAC through md.c.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:13:52 +02:00
Ronald Cron
de0d7e6cd0
Merge pull request #9247 from ronald-cron-arm/move-psa-headers
...
Move PSA headers to a new tf-psa-crypto directory
2024-06-18 18:48:24 +00:00
Gabor Mezei
1b646c2d79
Remove config-no-entropy.h
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-06-18 17:36:25 +02:00
Gabor Mezei
eafefb7a22
Revert "Update full_no_cipher_no_psa_crypto
test component"
...
This reverts commit 5bc887c64444c244300f17710a5d6a936ae5a3a2.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-06-18 17:35:25 +02:00
Gabor Mezei
13db41006c
Revert "Update config-no-entropy.h
for 'PSA_WANT' macros"
...
This reverts commit df59c630a510991b998bb16479fafb7757770324.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-06-18 17:35:00 +02:00
Thomas Daubney
95589c5c2e
Further padlock removals from all.sh
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-18 14:23:37 +01:00
minosgalanakis
2e3b11fb69
Merge pull request #9279 from valeriosetti/reduce-psasim-ping-interval
...
psa_sim: make server ping time much faster
2024-06-18 16:21:33 +03:00
Tom Cosgrove
a60d9223d6
Update psa_sim_serialise.pl to create the psa_sim_serialise.c we want
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 13:22:21 +01:00
Tom Cosgrove
37610024e9
Update psa_sim_generate.pl to create the psa_sim_crypto_client.c we want
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 14:10:55 +02:00
Valerio Setti
2eb8cc7d9d
psa_sim: improve log prints
...
- 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>
2024-06-18 14:10:54 +02:00
Tom Cosgrove
2468896857
Have psa_sim_serialise.pl generate psa_sim_serialize_reset()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 12:32:57 +01:00