Gilles Peskine
f9408282e8
Implement psa_generate_key_custom
...
Implement `psa_generate_key_custom()` and
`psa_key_derivation_output_key_custom()`. These functions replace
`psa_generate_key_ext()` and `psa_key_derivation_output_key_ext()`.
They have the same functionality, but a slightly different interface:
the `ext` functions use a structure with a flexible array member to pass
variable-length data, while the `custom` functions use a separate parameter.
Keep the `ext` functions for backward compatibility with Mbed TLS 3.6.0.
But make them a thin wrapper around the new `custom` functions.
Duplicate the test code and data. The test cases have to be duplicated
anyway, and the test functions are individually more readable this way.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gabor Mezei
91f1746f35
Remove sanity check for None
value
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:20 +02:00
Gabor Mezei
4706fe7f03
Update documentation and comments
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:08 +02:00
Gabor Mezei
3de658664b
Adjust temporarily the crypto config file location
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:08 +02:00
Gabor Mezei
33dd293723
Give better name for class
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:08 +02:00
Gabor Mezei
c5ff33cedf
Move config file modification checking to the Config
superclass
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:08 +02:00
Gabor Mezei
3e2a550f12
Pass ConfigFile
object as parameter for MultiConfig
constructor
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
8d72ac60b3
Fix error type
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
de6e192fd4
Add documentation
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
f77722d67f
Rename calss
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
9b0f9e77a0
Simplify set creation
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
e7742b360d
Unify the _format_parameter
function among the ConfigFile
subclasses
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
93a6d1f6ec
Make the name
parameter mandatory for the constructor of ConfigFile
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
8a64d8e346
Only write config files if it is modified
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
542fd38437
Update unsupported and deprecated psa fearues handling
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:06 +02:00
Gabor Mezei
d723b51bef
Fix for crypto config default value
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:06 +02:00
Gabor Mezei
ee521b6137
Restructure the configuration representation
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:06 +02:00
Gabor Mezei
92065ed28d
Fix pylint issues
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:06 +02:00
Gabor Mezei
62a9bd0f5d
Update and add documentation
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:06 +02:00
Gabor Mezei
3678deed9d
Add crypto config support for config.py
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:00 +02:00
Ronald Cron
3486950893
Adapt make_generated_files.bat
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
c51b0d1863
Adapt bump_version.sh
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
5903be2404
Adapt abi_check.py
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
9e2ff40850
Adapt code_style.py
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
f250cf6ce2
common.make: Use dedicated env variable
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:40 +02:00
Ronald Cron
2fd621ebe9
Adapt code_style.py
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:40 +02:00
Ronald Cron
aef8cf3b2e
Adjust build systems
...
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:40 +02:00
Ronald Cron
381247eda5
Adapt check-generated-files.sh
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:37 +02:00
Ronald Cron
c29afb684e
Adjust build systems
...
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:07:38 +02:00
Ronald Cron
fe3ad99af3
Merge pull request #9249 from davidhorstmann-arm/move-test-data-files-to-framework
...
Move test data files to framework
2024-07-09 11:56:14 +00:00
David Horstmann
dcf18dd876
Update paths pointing to tests/data_files
...
These now point to framework/data_files instead.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-05 15:49:03 +01:00
Thomas Daubney
9da1769237
Remove MBEDTLS_ECP_ALT and associated options
...
Also removed are all options of the form
MBEDTLS_ECP_XXX_ALT as well as
MBEDTLS_ECP_NO_FALLBACK.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-05 14:35:10 +01:00
Ronald Cron
5e3c529614
Merge pull request #9172 from gilles-peskine-arm/test_suite_config-booleans
...
Report configuration settings in the outcome file
2024-07-03 13:09:07 +00:00
Valerio Setti
0917265014
makefile: allow to build and link test suites against psasim
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 15:45:55 +02:00
Gilles Peskine
1b22dd8765
Merge remote-tracking branch 'dev' into test_suite_config-booleans
...
Reconcile the framework submodule heads to the latest one.
2024-07-02 14:24:27 +02:00
Ronald Cron
3d817add46
Adjust build systems
...
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-01 14:59:35 +02:00
Ronald Cron
f0481f562a
Merge pull request #9258 from tom-daubney-arm/drop_padlock_support
...
Drop support for VIA Padlock
2024-06-26 07:36:04 +00: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
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
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
Ronald Cron
7e5d61c41a
Adjust more paths to PSA headers
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13 09:51:20 +02:00
Ronald Cron
c7e9e367bb
Adjust build systems
...
Adjust build systems such as we can build
Mbed TLS in the default and full configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13 09:02:24 +02:00
David Horstmann
f8bbc2d532
Remove multi-type variable
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-06 16:16:31 +01:00
David Horstmann
330680e9fe
Allow code_style.py to work from a git hook
...
When running a git hook, git sets certain environment variables (such
as GIT_INDEX_FILE) which force git to look at the main repository,
overriding other options. This trips up code_style.py whenever it
tries to run a git command on the framework submodule.
Fix this by explicitly clearing git-related environment-variables
before running git commands on the framework. This is recommended
by git's documentation[1]:
> Environment variables, such as GIT_DIR, GIT_WORK_TREE, etc., are
> exported so that Git commands run by the hook can correctly locate
> the repository. If your hook needs to invoke Git commands in a
> foreign repository or in a different working tree of the same
> repository, then it should clear these environment variables so
> they do not interfere with Git operations at the foreign location.
[1] https://git-scm.com/docs/githooks
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-06 15:25:10 +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
b8360cf3ca
Make abi_check.py look in both locations
...
To deal with situations where we are comparing revisions before and
after the move of generate_psa_tests.py to the framework, look for
it in both the old and new locations.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:48:55 +01: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
Turiiya
27098b458b
fix typo
...
Signed-off-by: Turiiya <34311583+ttytm@users.noreply.github.com>
2024-05-18 18:08:12 +02:00