11717 Commits

Author SHA1 Message Date
Minos Galanakis
afb428e584 ssl-opt: Updated the keywords to look up during handshake fragmentation tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-27 15:20:40 +00:00
Waleed Elmelegy
c5f1ba3d50 Add missing client certificate check in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:40 +00:00
Waleed Elmelegy
5fc8d3f035 Test Handshake defragmentation only for TLS 1.3 only for small values
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:39 +00:00
Waleed Elmelegy
be59ab5671 Add guard to handshake defragmentation tests for client certificate
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:39 +00:00
Waleed Elmelegy
99f4691bd6 Add a comment to elaborate using split_send_frag in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:39 +00:00
Waleed Elmelegy
57f61f82fd Enforce client authentication in handshake fragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:39 +00:00
Waleed Elmelegy
826fc5c383 Remove unneeded mtu option from handshake fragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:39 +00:00
Waleed Elmelegy
e9b08846da Add client authentication to handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:38 +00:00
Waleed Elmelegy
1b2590b125 Require openssl to support TLS 1.3 in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:38 +00:00
Waleed Elmelegy
5b7c8bb064 Remove unnecessary string check in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:38 +00:00
Waleed Elmelegy
8870b99da4 Fix typo in TLS Handshake defrafmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:38 +00:00
Waleed Elmelegy
e11d8c9333 Improve TLS handshake defragmentation tests
* Add tests for the server side.
* Remove restriction for TLS 1.2 so that we can test TLS 1.2 & 1.3.
* Use latest version of openSSL to make sure -max_send_frag &
  -split_send_frag flags are supported.

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:38 +00:00
Waleed Elmelegy
29581ce229 Add TLS Hanshake defragmentation tests
Tests uses openssl s_server with a mix of max_send_frag
and split_send_frag options.

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-27 15:20:37 +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
Ronald Cron
204588678e
Merge pull request #9937 from valeriosetti/issue9688-backport
[Backport 3.6] Migrate DHE test cases to ECDHE
2025-01-29 09:59:11 +00: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
Valerio Setti
e94ab3cbdf test_suite_ssl: add ECDHE-RSA case for handshake_fragmentation()
This is the backport of commit b8ef2a4455 from the "development" branch
which adapts handshake_fragmentation() to use ECDHE-RSA instead of
DHE-RSA. However, since DHE-RSA is not removed in the mbedtls-3.6 branch,
here tests are added instead of replaced.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-28 11:42:14 +01:00
Valerio Setti
4f2a74d275 test_suite_ssl: add new ECDHE-RSA tests
PR #9916 adapt some DHE-RSA tests to use ECDHE-RSA instead. However,
since DHE-RSA is not deprecated in mbedtls-3.6 branch, this commit adds
these new tests alongside DHE-RSA ones intead of replacing them in order
to increase test coverage.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 17:40:15 +01:00
Manuel Pégourié-Gonnard
b6fff90ed1
Merge pull request #9907 from mpg/conf-curves-3.6
[3.6 backport]: mbedtls_conf_curves()
2025-01-27 08:21:30 +00:00
Manuel Pégourié-Gonnard
ea18c7e1e5 Fix incorrect test function
We should not manually set the TLS version, the tests are supposed to
pass in 1.3-only builds as well. Instead do the normal thing of setting
defaults. This doesn't interfere with the rest of the testing, so I'm
not sure why we were not doing it.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-22 10:31:43 +01:00
Manuel Pégourié-Gonnard
632667e394 Remove useless dependency from test function
This dependency was never right in the first place.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-22 10:31:19 +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
Gilles Peskine
bc3f917fb3 crypto_config.h: Don't list mechanisms that are not implemented
Don't list mechanisms that are not implemented in
`include/psa/crypto_config.h`, even commented out. Uncommenting them
wouldn't help anyway: they don't work. Having them listed, even commented
out, causes `find_dependencies_not_implemented()` in `psa_test_case.py` to
consider those mechanisms to be implemented, and thus causes
`generate_psa_tests.py` to generate test cases that cannot be executed.

The affected mechanisms are:

* `PSA_ALG_CBC_MAC` (`PSA_WANT_ALG_CBC_MAC`)
* `PSA_ALG_XTS` (`PSA_WANT_ALG_XTS`)
* `PSA_ECC_FAMILY_SECP_K1` 224-bit (`PSA_WANT_ECC_SECP_K1_224`)

Also remove the affected mechanisms from configuration adjustment files,
since that is code that can never be triggered.

There were already no generated test cases for SECP224K1 because
`PSA_WANT_ECC_SECP_K1_224` was already detected as a dependency that cannot
be implemented, because that is not a valid size: PSA defines SECP224K1 as
225-bit, and `crypto_knowledge.py` follows suite, so `generate_psa_tests.py`
saw `PSA_WANT_ECC_SECP_K1_225` in its enumeration but skipped it because it
was never mentioned in `crypto_config.h`.

This causes generated PSA tests to no longer include positive test cases for
`PSA_ALG_CBC_MAC` and `PSA_ALG_XTS`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-12-24 20:03:29 +01:00
Gilles Peskine
e7d92315ab Merge remote-tracking branch 'mbedtls-3.6' into psa-storage-test-cases-never-supported-positive-3.6
Update framework submodule to the tip of main.
2024-12-20 20:30:02 +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
Paul Elliott
cd40fa1f09
Merge pull request #9838 from waleed-elmelegy-arm/mbedtls-3.6
Backport 3.6: Fix Invalid opaque key testing
2024-12-11 17:47:34 +00: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
Gilles Peskine
edb89ff9c9 Create a new Python module used by generate_psa_tests.py
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-12-11 11:11:55 +01: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
Waleed Elmelegy
f12b5e907c Remove Invalid import/export key test
The test is supposed to be an opaque key test but the
testing function does not support specifying an
opaque driver.

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-12-10 17:39:57 +00:00
Waleed Elmelegy
68d6c79602 Fix export public-key opaque key test paramters
The test is marked as opaque but the parameter was set
to PSA_KEY_LIFETIME_VOLATILE.

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-12-10 17:39:22 +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