1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-06-13 19:21:32 +03:00
Commit Graph

32851 Commits

Author SHA1 Message Date
03e704018a Merge pull request #9917 from valeriosetti/issue9685
[development] Remove the DHE-RSA key exchange
2025-02-09 11:43:50 +00:00
bfc1ec15e6 tf-psa-crypto: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-07 17:48:11 +01:00
683e49e781 framework: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-07 17:47:59 +01:00
c8cac1d22f changelog: add note abot DHE-RSA removal
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:12:02 +01:00
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
d137f15e1b mbedtls_config.h: remove definition of MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:12:02 +01:00
f886924eec docs: remove references to DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:12:01 +01:00
02ae66830e check_config.h: remove checks for DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
8438c637ee tests: remove references to DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
b7e2eccf1f ssl_ciphersuites: remove MBEDTLS_KEY_EXCHANGE_SOME_XXDH_1_2_ENABLED
This symbol is unused in the code so it can be removed.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
b8621b6f9d ssl_ciphersuites: remove references to DHE-RSA key exchanges
In this commit also MBEDTLS_KEY_EXCHANGE_SOME_DHE_ENABLED is removed.
This cause some code in "ssl_ciphersuites_internal.h" and
"ssl_tls12_server.c" to became useless, so these blocks are removed
as well.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
89743b5db5 ssl_tls: remove code related to DHE-RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-06 10:05:58 +01:00
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
0baf3611e6 Merge pull request #9940 from valeriosetti/issue94-development
[Development] Move test_psa_*.py scripts to the framework
2025-02-05 13:55:38 +00:00
cf4e6a18e6 Remove unused variable in ssl_server.c
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
2025-02-05 13:10:01 +02:00
eb77e5b1c7 Update the changelog message
Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
2025-02-05 13:09:26 +02:00
c96d75bba3 framework: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-02-05 12:05:01 +01:00
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
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
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
be658c47c8 Merge pull request #9938 from bjwtaylor/ssl-ticket-api
Move ssl_ticket to the PSA API
2025-02-05 10:41:09 +00:00
7b4b176aca Merge pull request #9908 from Harry-Ramsey/move-configs-to-tf-psa-crypto
Move configs to TF-PSA-Crypto
2025-02-04 17:42:04 +00:00
7d4c48ba4f fixed trailing whitespace
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-02-04 15:27:53 +00:00
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
c89fa17ba3 Update configs README
This commit updates configs/ext/README.md to reflect the necessary files
which were removed from Mbed TLS.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-04 12:54:15 +00:00
6e5dfa851c Move crypto configs to TF-PSA-Crypto
This commit moves config-symmetric-only.h,
crypto-config-ccm-aes-sha256.h and crypto_config_profile_medium.h to
TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-04 12:54:15 +00:00
2a992bf39b Merge pull request #9915 from Harry-Ramsey/move-ssl-macros-development
Move MbedTLS Macros
2025-02-04 10:25:05 +00:00
b6fb07bc48 Change Changelog entry to a maximum of 80 charactors
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-02-04 09:08:02 +00:00
93a496e877 Update framework pointer
This commit updates the framework pointer to include changes to enable
check_names.py to run independently for TF-PSA-Crypto and Mbed TLS.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-04 08:13:14 +00:00
285722a3fe Update TF-PSA-Crypto pointer
This commit updates the TF-PSA-Crypto pointer to include the moved
config files.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-02-04 08:13:11 +00:00
837130cf65 Improve Changelog and correct alg selection
Improve the description of the API changes in the changelog and
fix some incorrect alg selection variables in ssl_server2.c.

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-02-04 07:50:19 +00:00
d0498803a1 Correct typos in comments
Correct the typos in the mbedtls_ssl_ticket_setup function docs

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-02-03 11:35:34 +00:00
afa11db620 Remove obselete checks due to the introduction of handhsake defragmen...
tation. h/t @waleed-elmelegy-arm

909e71672f

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
2025-02-01 15:42:43 +02:00
70fbf41760 Merge pull request #9945 from minosgalanakis/update_checkboxes_crypto
PR-Template: Updated the PR template with TF-PSA-Crypto checkbox
2025-01-31 17:33:38 +00:00
d5c8bf0f09 PR-Template: Updated the PR template with TF-PSA-Crypto checkbox
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-01-31 14:36:56 +00:00
2547ae9fcc Move SSL macro checks from TF-PSA-Crypto to Mbed TLS
This commit moves macro checks specifically for Mbed TLS from
TF-PSA-Crypto to Mbed TLS where they more approriately belong.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2025-01-31 13:58:43 +00:00
0c29cf87b1 Move ssl_ticket to the PSA API
Convert the mbedtl_ssl_ticket_setup function to use the TF_PSA_Crypto
API.

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-01-30 08:22:40 +00:00
9c2afb44bb Merge pull request #9923 from mpg/use-psa-crypto
Rm dead !USE_PSA_CRYPTO code from the library
2025-01-29 13:34:13 +00:00
ed445089c2 Merge pull request #9916 from valeriosetti/issue9688
Migrate DHE test cases to ECDHE
2025-01-29 09:59:22 +00:00
072c98eb75 Remove empty #if #endif block
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-29 10:40:15 +01:00
d883ba75cc Merge pull request #9633 from gabor-mezei-arm/9143_update_depends.py_curves_domain
Update the `curves` domain to use PSA macros in `depends.py`
2025-01-29 07:23:44 +00:00
53fe26c5ad Update a function's doxygen
There was two versions of this function with different arguments. Update
the documentation to match the signature of the function we kept.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:44:15 +01:00
28905b76fa Remove mention of USE_PSA_CRYPTO in documentation
This was the last occurrence found by:

    git grep -c 'MBEDTLS_USE_PSA_CRYPTO' library include

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:44:08 +01:00
c7403edad8 Rm dead !USE_PSA code: ssl_tls12_client (part 2)
Manually handle unifdef leftovers

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:43:57 +01:00
fef408976f Rm dead !USE_PSA code: ssl_tls12_client (part 1)
unifdef -m -DMBEDTLS_USE_PSA_CRYPTO library/ssl_tls12_client.c

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:21:09 +01:00
8fcfcf947c Appease unifdef
I was going to describe those changes as temporary, to be undone after
applying unifdef, but it turns out they're both in dead code, so there
will be nothing to undo after unifdef has run.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:19:35 +01:00
07a1edd590 Rm dead !USE_PSA code: ssl_tls.c (part 2)
Manually handle more complex expressions.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:19:15 +01:00
88800ddcc6 Rm dead !USE_PSA code: ssl_tls.c (part 1)
unifdef -m -DMBEDTLS_USE_PSA_CRYPTO library/ssl_tls.c
framework/scripts/code_style.py --fix library/ssl_tls.c

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:18:11 +01:00
1a3959c84e Rm dead !USE_PSA code: ssl_msg.c
unifdef -m -DMBEDTLS_USE_PSA_CRYPTO library/ssl_msg.c

Took care of everything in this file

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:18:02 +01:00
df5e1b6864 Rm dead !USE_PSA code: ssl_tls12_server.c (part 2)
Manual.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-01-28 16:17:54 +01:00