Commit Graph

32582 Commits

Author SHA1 Message Date
David Horstmann
1df752b353 Update framework to add ported test helper changes
Update the framework pointer to reference new changes to
tests/src/psa_exercise.key.c and tests/include/test/psa_exercise_key.h
that have been ported to the framework from the main repo.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 16:32:33 +00:00
David Horstmann
0223bc6dcc Update paths in TF-PSA-Crypto CMakeLists.txt
Some test build commands were moved to the CMakeLists.txt in the
tf-psa-crypto directory. Apply framework-related changes to this moved
section.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
7bf3489d64 Update framework submodule
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
0b2cd56718 Update framework submodule
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
c3cea3040d Update framework submodule
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
0771253cf4 Properly clean instrument_record_status.h
The paths to this header in clean: targets were missed previously when
changing paths to reflect the move of the header to the framework.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
3281e16c35 Reverse accidental docs PSA test wrappers path
These were accidentally documented incorrectly in the PSA shared memory
documentation due to a global find and replace.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
a244687b9d Add missing include path to visual C script
We need to include from both tests/include and framework/tests/include.
Update scripts/generate_visualc_files.pl to re-add tests/include, which
had previously been replaced with framework/tests/include.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
36c819ccc9 Update test_keys.h path on Windows
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
8a5b3afc5d Update paths to generated PSA test wrappers
These are not moving to the framework, so their paths are fine to stay
as they are, undo the update done through global search-replace.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
d962680cbc Update generate path to instrument_record_status.h
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
dc45951cf6 Update path to PSA crypto alt headers
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
08953f7135 Add extra paths to generate_visualc_files.pl
Both the main repository and framework test helper paths are needed, so
generate these in the script.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
8a8d56aa87 Update make clean target with moved test helpers
Test helpers that are now moved to the framework must be cleaned
properly.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
e6a7c247fd Update test_keys.h generation in Makefile
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
6bbd9c0b70 Update libtestdriver paths in tests/Makefile
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
cbab2ff06e Update path substitution for TF-PSA-Crypto tests
This path substitution needs to be performed on the new paths in the
framework as well.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
69b12ee121 Add tests/Makefile targets for moved test helpers
Everything that has been moved to tests/src needs a Makefile target in
order to be built.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
d9ad663cea Update common.mk with test helper object paths
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
bc06e2acb5 Add framework test include path to common.mk
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
1b457a9e4d Undo incorrect path substitution
The find and replace of tests/src -> framework/tests/src and
tests/include -> framework/tests/include accidentally caused an
incorrect path substitution to be performed in tests/Makefile.

Undo this change and make the substitution correct again.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
b4dcb952ea Add SSL-related test includes to ssl programs
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
306f4106cf Add the framework/tests/include path to testsuites
These need to include from the framework path as this is where most test
helpers have been moved to.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
d2cabf2030 Add missing extra include path to fuzzer programs
The fuzzer needs both kinds of test helper so needs to include things
from both new and old locations.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
204eb2cfd9 Re-add tests/include path for test helpers
These must include from both the framework and the main repository since
the test helpers straddle the two locations.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
5b93d97b95 Update references to test helpers
Replace:
* tests/src -> framework/tests/src
* tests/include -> framework/tests/include

Except for occurrences of:
* tests/src/test_helpers (since this only contains ssl_helpers.c)
* tests/src/test_certs.h
* tests/include/alt_dummy

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
David Horstmann
531adafb0a Move some test helpers out of Mbed TLS
Everything not TLS-related and not ALT-interface-related has been moved
out of tests/src and tests/include and into the framework, except for
the PSA test wrappers.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:43 +00:00
Janos Follath
fe4b02cc69
Merge pull request #9602 from paul-elliott-arm/add_key_agreement_negative_tests
Add key agreement negative tests
2024-11-18 13:02:03 +00:00
Waleed Elmelegy
ceca4dedbe Remove mention of PSA_EXPORT_ASYMMETRIC_KEY_MAX_SIZE
Remove mention of PSA_EXPORT_ASYMMETRIC_KEY_MAX_SIZE
since it's not yet add defined in our implementation
of PSA Crypto.

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-18 10:56:53 +00:00
Emmanuel Ferdman
5c0c515c56
Update crypto_se_driver.h reference
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-11-17 02:34:52 -08:00
Waleed Elmelegy
5fc76a91c6 Fix small typos in iop key generation & agreement APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:28:29 +00:00
Waleed Elmelegy
fad77f1ff4 Add iop export public-key generated test wrappers
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:27:36 +00:00
Waleed Elmelegy
bdb6385945 Add iop export public-key dummy API implementations
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:26:34 +00:00
Waleed Elmelegy
cee3af2ca8 Add psa_export_public_key_iop_abort() header/doc
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:13:58 +00:00
Waleed Elmelegy
e5b3e66fba Add psa_export_public_key_iop_complete() header/doc
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:13:13 +00:00
Waleed Elmelegy
c8d50f5753 Add psa_export_public_key_iop_setup() header/docs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:12:12 +00:00
Waleed Elmelegy
118b078df9 Add psa_export_public_key_iop_get_num_ops() header/docs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:10:51 +00:00
Waleed Elmelegy
e34a5c5f9a Add psa_export_public_key_iop_s struct and docs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-15 17:10:05 +00:00
Ronald Cron
fee08b45e2
Merge pull request #9760 from ronald-cron-arm/tf-psa-crypto-cmake
Finalize the integration of the TF-PSA-Crypto build system into the Mbed TLS one
2024-11-15 17:05:16 +00:00
Paul Elliott
66d7bcbef1 Add key export on successful key agreement
More sanity checks on key coming out of key agreement.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
7267e56189 Fix incorrect return code
Code return differs from raw agreement, so tests fail.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
2c9d398553 Add new psa_key_agreement() to key exercises
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
c54fcc765e Add new psa_key_agreement() to key_agreement_fail()
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
b1039afbd0 Regenerate PSA Sim headers
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
958bdf7f16 Add required code to psa_sim_generate.pl
Non generated code was unfortnuately added to psa_sim_crypto_server.c,
fix that by adding it to the generation scripts.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Ronald Cron
8237484318 cmake: Use TF_PSA_CRYPTO_CONFIG_FILE to prefix crypto targets
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-15 15:05:34 +01:00
Paul Elliott
d118cd21d6 Fix definition of psa_generate_key_iop_complete()
Incorrect usage of psa_key_id_t breaks ability to regenerate psa_sim
headers properly, should have been mbedtls_svc_key_id_t in the first
place, so replace with that.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-14 19:07:58 +00:00
Ronald Cron
d779e95720 Fix cmake option name
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 16:25:34 +01:00
Waleed Elmelegy
e0dac22cf1 Change MBEDTLS_ECP_MAX_MPI to MBEDTLS_ECP_MAX_MPI_BYTES for better clarity
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-14 15:16:58 +00:00
Ronald Cron
0cc68601e6
Merge pull request #9611 from gabor-mezei-arm/9142_update_depends.py_cipher_chaining_domain
Update the `cipher_chaining` domain to use PSA macros in `depends.py`
2024-11-14 14:32:35 +00:00