1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-05-11 01:11:42 +08:00

12367 Commits

Author SHA1 Message Date
Minos Galanakis
41782a9cd0 ssl-opt: Added negative-assertion testing, (HS Fragmentation disabled)
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-24 09:16:06 +00:00
Minos Galanakis
85fe73d55d ssl-opt: Added tls 1.2 tests for HS defragmentation.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-24 09:16:06 +00:00
Minos Galanakis
a4dde77cbe ssl-opt: Dependency resolving set to use to requires_protocol_version HS deframentation tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-24 09:16:06 +00:00
Minos Galanakis
a8a298c9d6 ssl-opt: Adjusted the wording on handshake fragmentation tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-24 09:16:06 +00:00
Minos Galanakis
a1b9117f17 ssl-opt: Added requires_openssl_3_x to defragmentation tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-24 09:16:06 +00:00
Minos Galanakis
270dd7462e ssl-opt: Updated the keywords to look up during handshake fragmentation tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
4028cfd9ca Add missing client certificate check in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
5f21537c2a Test Handshake defragmentation only for TLS 1.3 only for small values
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
a75c7e09c8 Add guard to handshake defragmentation tests for client certificate
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
f162249e87 Add a comment to elaborate using split_send_frag in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
61b8e2d225 Enforce client authentication in handshake fragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
39d83dd38d Remove unneeded mtu option from handshake fragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
48874b3aba Add client authentication to handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
f9120311e3 Require openssl to support TLS 1.3 in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
fccd014c2d Remove unnecessary string check in handshake defragmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
c0118d87b9 Fix typo in TLS Handshake defrafmentation tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2025-02-24 09:16:06 +00:00
Waleed Elmelegy
0e0d5d4dc8 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-24 09:16:06 +00:00
Waleed Elmelegy
79a8ded315 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-24 09:16:06 +00:00
Gilles Peskine
e5054e495a mbedtls_ssl_set_hostname tests: baseline
Test the current behavior.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-02-20 19:24:16 +01:00
Gilles Peskine
58b399e81e Automate MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK dependency
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-02-20 18:51:14 +01:00
Harry Ramsey
21506fd7f1 Update documentation regarding metatest
This commit updates the paths in the documentation for metatest.c as it
has been moved to MbedTLS Framework.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-19 15:30:25 +00:00
Harry Ramsey
9b4035cc9e 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-19 15:30:25 +00:00
Harry Ramsey
d096793c3f Update paths for moved program files in components-build-system.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-19 15:30:25 +00:00
Harry Ramsey
b14141dd71 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-19 15:17:32 +00:00
Harry Ramsey
2a75a60d34 Update path to user-config-zeroize-memset.h
This commit updates the path to user-config-zeroize-memset.h as it has
been moved to TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-19 08:03:57 +00:00
Harry Ramsey
76e476245a Move zeroize config to TF-PSA-Crypto
This commit moves user-config-zeroize-memset.h to TF-PSA-Crypto where it
more appropriately belongs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-19 08:03:57 +00:00
Valerio Setti
24e6ecb502 tests: move components-compliance.sh to tf-psa-crypto repo
This file is cancelled from the Mbed TLS repo and copied to the
TF-PSA-Crypto one.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-17 17:40:08 +01:00
Valerio Setti
1494a09ff7 test_suite_ssl: require GCM or ChaChaPoly in handshake_serialization()
Hanshake serialization requires that the selected ciphersuite uses
an AEAD algorithm. However, following the DHE-RSA removal, trying to
still use RSA signature might select a ciphersuite which is not using
AEAD, but CBC instead (see preference order in "ssl_ciphersuite.c").

This is especially problematic in tests scenarios where both GCM and
ChaChaPoly are disabled, so that CCM remains as the only AEAD algorithm.
Ciphersuites using RSA signature and CCM are very low on the preference
list, so very unlikely to be picked in tests. This cause a CBC one to
be selected in this case and the handshake_serialization() function
to fail.

In order to prevent failures from happening, in this commit we require
that either GCM or ChaChaPoly are enabled, so that ciphersuites using one
of these are likely to be picked.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:12:02 +01:00
Valerio Setti
8438c637ee tests: remove references to DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
Valerio Setti
98f348a2c5 ssl-opt.sh|compat.sh: remove references to DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
Valerio Setti
da1673c013 components-compliance.sh: update references to test_psa_compliance.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-05 12:04:36 +01:00
Valerio Setti
2ef55352e8 components-configuration.sh: update references to test_psa_constant_names.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-05 12:04:36 +01:00
Valerio Setti
40e14a7559 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:04:36 +01:00
Harry Ramsey
94c386a8ea Update config paths in scripts
This commit updates the moved config paths in multiple script files.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-04 12:54:15 +00:00
Ronald Cron
ed445089c2
Merge pull request #9916 from valeriosetti/issue9688
Migrate DHE test cases to ECDHE
2025-01-29 09:59:22 +00:00
Gabor Mezei
7554eeaf4c
Disable 224K1 while testing the other curves
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-01-27 15:03:14 +01:00
Gabor Mezei
fe14d85b7c
Remove unused symbol
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-01-27 15:03:14 +01:00
Gabor Mezei
069e3e6fe7
Remove reference for PSA_WANT_ALG_SECP_K1_224
The `PSA_WANT_ALG_SECP_K1_224` symbol has been removed.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-01-27 15:03:14 +01:00
Gabor Mezei
0a2f257492
Use symbol matching for the curves domain
Instead of using the `crypto_knowledge.py`, use basic symbol matching for the
`PSA_WANT_ECC_*` macros to search for in the `curves` domain of `depend.py`.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-01-27 15:03:13 +01:00
Gabor Mezei
1c49cff468
Use PSA macros for the curves domain
Exclude the SECP224K1 curve due it is unstable via the PSA API.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-01-27 15:03:13 +01:00
Valerio Setti
0ebd6de77b ssl-opt.sh: remove tests forcing DHE-RSA for which have alternatives
Remove tests which are forcing DHE-RSA, but for which an ECDHE-RSA
alternative already exists.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 12:46:26 +01:00
Valerio Setti
3b412e283f ssl-opt.sh: remove tests which are specific for DHE-RSA
For these ones there is no ECDHE alternative as they are testing
specific features of DHE.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 12:46:26 +01:00
Valerio Setti
309a7ec70e ssl-opt.sh: adapt tests from DHE-RSA to ECDHE-RSA
Adapted tests do not already have an ECDHE-RSA test available.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 12:46:26 +01:00
Valerio Setti
592f6826dd 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-27 12:46:25 +01:00
Valerio Setti
8638603ba7 test_suite_ssl: remove tests specific for DHE-RSA
These tests were specific for DHE-RSA (which is being removed on
development branch) and also for each of them there was already the
ECDHE-RSA counterpart available.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 12:38:39 +01:00
Valerio Setti
b8ef2a4455 test_suite_ssl: adapt handshake_fragmentation() to use ECDHE-RSA
Use ECDHE-RSA instead of DHE-RSA.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 12:38:39 +01:00
Valerio Setti
5b7bfd8d5a test_suite_ssl: adapt DHE-RSA tests to ECDHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-27 12:38:39 +01:00
Ronald Cron
189dcf630f
Merge pull request #9910 from valeriosetti/issue9684
Remove DHE-PSK key exchange
2025-01-27 11:15:10 +00:00
Manuel Pégourié-Gonnard
7e1154c959
Merge pull request #9906 from mpg/rm-conf-curves
[dev] Remove deprecated function mbedtls_ssl_conf_curves()
2025-01-27 08:21:27 +00:00
Valerio Setti
6e892cb630 components-configuration-crypto.sh: remove references to DHE_PSK kex
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-01-24 11:49:59 +01:00