Commit Graph

32561 Commits

Author SHA1 Message Date
Harry Ramsey
7fa6caed4c Concatenate program demos between Mbed TLS and TF-PSA-Crypto
This commit concatenates the running of program demos between Mbed TLS
and TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
885ce72ca6 Remove duplicate demo_common.sh in tf-psa-crypto
This commit removes the duplicate demo_common.sh file in tf-psa-crypto
and instead use the demo_common.sh file in mbedtls/programs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
ff57cc56ba Move program gitignore to tf-psa-crypto/programs
This commit moves programs from tf-psa-crypto/.gitignore to
tf-psa-crypto/programs/.gitignore.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
af0594198b Revert program CC output in Makefile
This commit reverts tf-psa-crypto program CC output informing the user
what file is being compiled.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
20d3cf2300 Update programs/Makefile path
This commit updates a recipe path in programs/Makefile.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
be20844c23 Update path in run_demos.py
This commit updates the path to programs in run_demos.py to
tf-psa-crypto/programs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
8ee1b5d098 Update gitignore
Update gitignore in programs and tf-psa-crypto following the move of
multiple files.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
cefc67242b Fix make_generated_files.bat
This commit fixes make_generated_files.bat as it requires the user to be
inside the tf-psa-directory to invoke generate_psa_constants.py.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
61811e6595 Update path in check-generated-files.sh
This commit updates the path to generate_psa_constants.py in
check-generated-files.sh

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:32 +00:00
Harry Ramsey
e9e316e8c5 Update path in programs/psa/CMakeList.txt
This commit updates the path to the generate_psa_constants.py script in
programs/psa/CMakeList.txt file.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
fb4824b496 Fix incorrect paths to generate_psa_constants.py
This commit fixes incorrect paths to generate_psa_constants.py after
being moves to tf-psa-crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
91c0d4685f Use static paths in makefile for programs
This commit uses static paths in the makefile to create programs since
the script generate_visualc_files.pl cannot substitute variable paths.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
61372efe95 Refactor tests and programs comment
This commit refactors comments refering to tf-psa-crypto for the
correct path upon repo split.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
e1d6f74b92 Move generate_psa_constants.py to tf-psa-crypto
This commit moves generate_psa_constants.py to tf-psa-crypto and updates
the paths inside the script necessary for that move.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
fae7411429 Refactor programs/Makefile
This commit refactors the Makefile in the programs directory to remove
unused variables and consistent naming schemes.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
c94cb70d58 Update paths in .sln file
This commit updates the paths in generate_visualc_files.pl to update the
generated .sln file with the new paths for psa programs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
d66fb8475c Adjust psa program paths in CMakeLists
This commit adjusts the paths of programs/psa to tf-psa-crypto/programs
in CMakeLists.txt.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
e1d70a00d6 Adjust psa program paths in Makefile
This commit adjusts the paths of programs/psa to tf-psa-crypto/programs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
75e8e030b1 Fix paths for programs/psa
This commit fixes paths for programs/psa to tf-psa-crypto/programs/psa.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:48 +00:00
Harry Ramsey
ced26059e3 Move psa programs to tf-psa-crypto directory
This commit moves psa programs from the programs/psa directory to
tf-psa-crypto/programs/psa directory.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:12:43 +00:00
Waleed Elmelegy
a898127144 Remove PSA_ERROR_NOT_SUPPORTED as a return value to iop abort APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-20 15:33:52 +00:00
Waleed Elmelegy
bf1af30ec9 Correct typos in iop export public-key headers
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-20 15:32:37 +00:00
Waleed Elmelegy
39d54e1fb1 Prevent a warning in case PSA_VENDOR_ECC_MAX_CURVE_BITS is set to 0
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-20 15:08:52 +00:00
Waleed Elmelegy
44e0f75ca3 Use PSA Macros instead of legacy ones in psa_generate_key_iop_complete()
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-20 12:31:32 +00:00
Waleed Elmelegy
08e28e6573 Check error codes on called functions in mbedtls_psa_generate_key_iop_complete
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-20 12:29:39 +00:00
Manuel Pégourié-Gonnard
905395eefd
Merge pull request #9756 from davidhorstmann-arm/move-some-test-helpers-to-framework
Move some test helpers to the framework
2024-11-20 09:55:42 +00:00
David Horstmann
ed91f8890f Replace tabs with spaces in Makefile
Tabs were introduced in a place where spaces are being used for
alignment. Correct this.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-19 17:15:30 +00:00
David Horstmann
ccf8c42b1a Update framework submodule
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-19 17:14:13 +00:00
Waleed Elmelegy
db0c4a4b2c Remove MBEDTLS_ECP_MAX_MPI_BYTES macro
Remove MBEDTLS_ECP_MAX_MPI_BYTES macro as
it's not needed anymore.It was added when
memcpy was being used but now that
mbedtls_mpi_write_binary() is being used
it can handle copying a large buffer filled
with leading zeros into a smaller buffer.

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-18 17:38:59 +00:00
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