3104 Commits

Author SHA1 Message Date
Gilles Peskine
9d54be57b0 Generate handshake defragmentation test cases: update analyze_outcomes
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-05 10:08:21 +01:00
Gilles Peskine
28f953c5ec New generated file: tests/opt-testcases/handshake-generated.sh
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-03 20:58:32 +01:00
Gilles Peskine
e0f1240cd5 Merge remote-tracking branch 'mbedtls-3.6' into tls-defragmentation-merge-3.6-20250303 2025-03-02 21:16:08 +01:00
Minos Galanakis
21e4f21df9 analyze_outcomes: Temporary disabled 3 HS Degragmentation tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-27 15:25:50 +00:00
Harry Ramsey
d621d344c3 Update path for moved test_zeroize.gdb script
This commit updates the path for the moved test_zeroize.gdb script which
has been moved to MbedTLS-Framework.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-20 14:51:26 +00:00
Harry Ramsey
151e0892a1 Update paths for moved dlopen_demo.sh
This commit updates the paths for dlopen_demo.sh in
components-build-system.sh as the file has been moved to the framework.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-20 14:51:26 +00:00
Harry Ramsey
0c6eb5d6e9 Move programs out of Mbed TLS
This commit moves demo_common.sh, dlopen_demo.sh, metatest.c
query_compile_time_config.c, query_config.h, query_included_headers.c,
zeroize.c and test_zeroize.gdb from MbedTLS into the MbedTLS framework.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-17 11:43:55 +00:00
Valerio Setti
aa7bd59dbe components-compliance.sh: update references to test_psa_compliance.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-05 12:07:25 +01:00
Valerio Setti
d673acf89e components-configuration.sh: update references to test_psa_constant_names.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-05 12:07:25 +01:00
Valerio Setti
7297e8d440 Move files out of Mbed TLS
The following files are moved to the framework repo (deleted here):

tests/scripts/test_psa_compliance.py
tests/scripts/test_psa_constant_names.py

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-05 12:07:25 +01:00
Valerio Setti
1a0ee063e2 test_suite_ssl: update description for conf_curve and conf_gruop tests
These tests are about EC curves/groups, not DH ones, so the description
should be updated accordingly.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-28 11:42:15 +01:00
Gilles Peskine
a6c1f56a36 Add ignore list entries for ECDH/FFDH algorithm without key type
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-01-20 15:55:56 +01:00
Gilles Peskine
a2a0c394dd Remove test coverage exceptions that are no longer needed
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-01-20 15:55:56 +01:00
Valerio Setti
bb71bb568b components-build-system.sh: align component_test_cmake_as_package
Align component_test_cmake_as_package to the "development" branch
version.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-14 09:48:05 +01:00
Valerio Setti
167b329e03 Move files out of Mbed TLS
The following files are moved to the framework repo (deleted here):

tests/scripts/pkgconfig.sh

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-14 09:48:05 +01:00
Valerio Setti
87f988545a component-basic-checks: fix paths of files moved to framework
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-09 17:05:21 +01:00
Valerio Setti
7892bcc18b Move files out of Mbed TLS
The following files are moved to the framework repo (deleted here):

tests/scripts/check_names.py

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-09 17:05:21 +01:00
Gilles Peskine
905899839d
Merge pull request #9796 from gilles-peskine-arm/psa-storage-test-cases-never-supported-positive-3.6
Backport 3.6: Switch generate_psa_test.py to automatic dependencies for positive test cases
2025-01-09 13:53:11 +00:00
Valerio Setti
b90d12490c scripts: fix paths for files moved to framework
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-08 10:03:49 +01:00
Valerio Setti
81e0abc440 Move files out of Mbed TLS
The following files are moved to the framework repo (deleted here):

scripts/assemble_changelog.py
tests/scripts/check-doxy-blocks.pl
tests/scripts/check-python-files.sh
tests/scripts/doxygen.sh
scripts/apidoc_full.sh
tests/scripts/recursion.pl

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-08 10:02:35 +01:00
Gilles Peskine
b62279d960 Remove test coverage exceptions that are no longer needed
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-12-24 20:03:29 +01:00
Elena Uziunaite
4d6a2aa895 Adujst paths
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-19 10:43:03 +02:00
Elena Uziunaite
24157795a0 Move files out of Mbed TLS
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-19 10:43:03 +02:00
Elena Uziunaite
993df66645 Adjust paths
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-18 12:19:20 +02:00
Ronald Cron
4497d5f39a
Merge pull request #9832 from ronald-cron-arm/finalize-split-preparation-2_3.6
Move test_keys.h to include/test
2024-12-11 13:39:26 +00:00
Janos Follath
a770f30ee9
Merge pull request #9782 from gilles-peskine-arm/psa-storage-test-cases-never-supported-preliminaries-3.6
Backport 3.6: Make some edge cases of not-supported or invalid mechanisms more uniform
2024-12-10 18:16:05 +00:00
Ronald Cron
4eaf54e646 Move test_keys.h to include/test
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:32:07 +01:00
Elena Uziunaite
e26f20e745 Adapt paths for scripts/quiet
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-09 15:37:49 +00:00
Elena Uziunaite
58172ae15e Adapt paths for output_env.sh
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-09 15:37:49 +00:00
Elena Uziunaite
9837ad316a Move files out of Mbed TLS
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-09 15:37:48 +00:00
Harry Ramsey
816c7c27f4 Refactor scripts to use config.py instead of config.pl
This commit refactors scripts to use config.py which replaces config.pl.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-05 10:55:31 +00:00
Harry Ramsey
8fae4b05ef Remove obsolete tcp_client.pl
This commit removes tcp_client.pl and removes it from ssl-opt.sh as it
has been replaced by test_suite_ssl.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-05 10:54:39 +00:00
Harry Ramsey
b5cfc05e89 Remove obsolete Travis CI scripts
This commit removes obsolete Travis CI scripts that are no longer
required due to the transition to a publically available CI image.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-05 10:53:47 +00:00
Harry Ramsey
454cb09a3a Remove obsolete Docker CI scripts
This commit removes Docker CI scripts from the repository as they are no
longer necessary with CI images being publically available.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-05 10:53:37 +00:00
Elena Uziunaite
695810a093 Define FRAMEWORK
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-11-27 13:21:53 +00:00
Elena Uziunaite
f1099cb77e Use new functions
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-11-27 13:21:53 +00:00
Gilles Peskine
8729b10f26 Fix edge case with half-supported ECDSA (manual test cases)
ECDSA has two variants: deterministic (PSA_ALG_DETERMINISTIC_ECDSA) and
randomized (PSA_ALG_ECDSA). The two variants are different for signature but
identical for verification. Mbed TLS accepts either variant as the algorithm
parameter for verification even when only the other variant is supported,
so we need to handle this as a special case when generating not-supported
test cases.

In this commit:

* Add manually written not-supported test cases for the signature
  operation when exactly one variant is supported.
* Add manually written positive test cases for the verification
  operation when exactly one variant is supported.
* Register that !ECDSA but DETERMINISTIC_ECDSA is not tested yet
  (https://github.com/Mbed-TLS/mbedtls/issues/9592).

A commit in the framework will take care of automatically generated test cases.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-21 09:48:35 +01:00
David Horstmann
cbf530dde7 Disable test hooks when checking missing symbols
The function mbedtls_test_hook_error_add() is declared in the library
but supplied by test helpers in framework/tests/src, so it is undefined
in library-only builds. This messes up our checks for missing symbols,
so disable MBEDTLS_TEST_HOOKS when we are building to check missing
symbols.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-14 14:19:49 +00:00
David Horstmann
501e9a9fee 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-14 14:19:42 +00:00
David Horstmann
b19374f548 Update path to PSA crypto alt headers
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-14 14:19:42 +00:00
David Horstmann
dcf42a0b53 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-14 14:19:40 +00:00
Manuel Pégourié-Gonnard
38b9f724a8 Update path to all-core.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-12 12:11:07 +01:00
Manuel Pégourié-Gonnard
598cc22f9e Move all-{core,helpers}.sh out of Mbed TLS
Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
2024-11-12 11:40:11 +01:00
Manuel Pégourié-Gonnard
69fe0e8bf4 all.sh: improve check for clean config files
The existing check only took care of CONFIG_H. This was both not enough
and too much:
- not enough because config.py can also modify CRYPTO_CONFIG_H and we
want to know about it just as much as CONFIG_H;
- too much because CONFIG_H does not exist in tf-psa-crypto.

Check a list of files instead of a single one, and adjust that list.

Also update an outdated comment about Makefiles

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-05 10:38:02 +01:00
Manuel Pégourié-Gonnard
621c96a71f all.sh: rationalize relative path usage
In preparation for adding tf-psa-crypto/test/scripts/all.sh which will
run from tf-psa-crypto.

Use paths relative to the currently sourced file when including common
files (ie, those that will soon be moved to the framework). Otherwise,
use paths relative to the current directory, aka project's root.

Document that test/script/all.sh must be invoked from the project's root
(that was already the case, but implicit so far).

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-05 10:37:36 +01:00
Gilles Peskine
aef3f74e4d
Merge pull request #9739 from gilles-peskine-arm/mbedtls_psa_ecp_generate_key-no_public_key-3.6
Backport 3.6: PSA ECC key generation: don't generate the public key
2024-11-04 16:36:49 +00:00
Paul Elliott
962eb8572b
Merge pull request #9737 from mpg/drop-armcc5-3.6
[3.6] Drop armcc5 support in all.sh
2024-10-30 12:29:55 +00:00
Gilles Peskine
9a09443973 Unit tests for mbedtls_psa_ecp_generate_key()
Run the function on a few different curves with shorter, just-right and
larger buffer sizes. Perform some basic sanity checks on the output (which
is random).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-30 12:18:16 +01:00
Manuel Pégourié-Gonnard
62a57e68a5 Rm forgotten armc5
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-10-29 12:42:43 +01:00
Manuel Pégourié-Gonnard
95395738b4 Drop building with armcc5 in all.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-10-29 11:39:41 +01:00