1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-06-10 16:43:47 +08:00

33072 Commits

Author SHA1 Message Date
Gilles Peskine
7ab9fb6d14 Pacify ancient clang -Wmissing-initializer
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-09 12:52:26 +02:00
Gilles Peskine
7c1dbeff49 Test split, coalesced-split and empty handshake records
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-09 12:52:26 +02:00
Gilles Peskine
92122edf4b Create handshake record coalescing tests
Create tests that coalesce the handshake messages in the first flight from
the server. This lets us test the behavior of the library when a handshake
record contains multiple handshake messages.

Only non-protected (non-encrypted, non-authenticated) handshake messages are
supported.

The test code works for all protocol versions, but it is only effective in
TLS 1.2. In TLS 1.3, there is only a single non-encrypted handshake record,
so we can't test records containing more than one handshake message without
a lot more work.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-09 12:52:26 +02:00
Gilles Peskine
a4bf00227f Document gotcha of move_handshake_to_state
A single call to move_handshake_to_state() can't do a full handshake.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-09 12:52:26 +02:00
Gilles Peskine
c67befee6a Add a log message on every SSL state transition
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-09 12:52:26 +02:00
Gilles Peskine
f670ba5e52 Always call mbedtls_ssl_handshake_set_state
Call a single function for all handshake state changes, for easier tracing.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-09 12:52:22 +02:00
Gilles Peskine
3b819cf22f
Merge pull request #10109 from mpg/merge-from-restricted
Merge from restricted
2025-04-07 14:04:06 +00:00
Ronald Cron
16be0f09cf
Merge pull request #10008 from valeriosetti/issue138-development
[development] Add test_tf_psa_crypto_cmake_shared to components-build-system.sh
2025-04-04 18:11:00 +02:00
Valerio Setti
48e5c958a7 tf-psa-crypto: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-04 13:51:28 +02:00
Valerio Setti
0690a63472 framework: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-04 13:51:22 +02:00
Ronald Cron
8bbe60a67f
Merge pull request #10102 from ronald-cron-arm/check-generated-files-follow-up
Check generated files follow-up
2025-04-02 20:55:45 +00:00
Ronald Cron
33770e75c3 Update tf-psa-crypto pointer
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-04-01 22:30:42 +02:00
Ronald Cron
96121ed94f Update framework pointer
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-04-01 22:30:33 +02:00
Manuel Pégourié-Gonnard
ed4a2b4f0a Merge branch 'development-restricted' into merge-from-restricted
* development-restricted:
  Add missing credit for set_hostname issue
  Add changelog entry for TLS 1.2 Finished fix
  TLS1.2: Check for failures in Finished calculation
  ssl_session_reset: preserve HOSTNAME_SET flag
  Document the need to call mbedtls_ssl_set_hostname
  Improve documentation of mbedtls_ssl_set_hostname
  Changelog entries for requiring mbedls_ssl_set_hostname() in TLS clients
  Add a note about calling mbedtls_ssl_set_hostname to mbedtls_ssl_setup
  mbedtls_ssl_set_hostname tests: add tests with CA callback
  Call mbedtls_ssl_set_hostname in the generic endpoint setup in unit tests
  Require calling mbedtls_ssl_set_hostname() for security
  Create error code for mbedtls_ssl_set_hostname not called
  Keep track of whether mbedtls_ssl_set_hostname() has been called
  Access ssl->hostname through abstractions in certificate verification
  mbedtls_ssl_set_hostname tests: baseline
  Add a flags field to mbedtls_ssl_context
  Automate MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK dependency
  Make guards more consistent between X.509-has-certs and SSL-has-certs
  Fix Doxygen markup
  Make ticket_alpn field private

 Conflicts:
	programs/ssl/ssl_test_common_source.c
2025-04-01 09:40:47 +02:00
Manuel Pégourié-Gonnard
e2359585e4
Merge pull request #10078 from bjwtaylor/pk_rsa_alt-removal
Pk rsa alt removal
2025-04-01 07:32:46 +00:00
Ronald Cron
762c80199d Use make_generated_files.py in make_generated_files.bat
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-31 17:18:03 +02:00
Ronald Cron
444db895f7 Remove check-generated-files.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-31 17:18:03 +02:00
Ronald Cron
694cbfa6de
Merge pull request #10101 from ronald-cron-arm/remove-all-sh-wrapper
Remove all.sh wrapper
2025-03-31 09:36:25 +00:00
Ronald Cron
5d9b9d244f Rename mbedtls-all.sh to just all.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-29 10:06:38 +01:00
Ronald Cron
8e2d40dbec Remove all.sh wrapper
Now that in TF-PSA-Crypto CI, the TF-PSA-Crypto
all.sh components are run in pure TF-PSA-Crypto
context, there is no need to run them as part of
mbedtls CI anymore. The all.sh wrapper wrapping
./tests/scripts/mbedtls-all.sh and
./tf-psa-crypto/tests/scripts/all.sh can be
removed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-29 10:01:53 +01:00
Ronald Cron
3189752b2f
Merge pull request #10073 from felixc-arm/remove-inject-entropy
[development] Remove MBEDTLS_PSA_INJECT_ENTROPY
2025-03-28 13:22:00 +00:00
Felix Conway
1459e75d3d Update tf-psa-crypto pointer
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-28 10:36:00 +00:00
Manuel Pégourié-Gonnard
064f68ec85
Merge pull request #10032 from valeriosetti/psasim-doc-update
psasim: update README file
2025-03-28 09:11:13 +00:00
Felix Conway
48426b12ef Add MBEDTLS_PSA_INJECT_ENTROPY back into config-split.md
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-28 09:01:32 +01:00
Felix Conway
133f7aab2c Add MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES to ignore list for CI
With the removal of the component_test_psa_inject_entropy test,
MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES is no longer set in any tests, and so
the CI will complain unless it is added to the ignore list.

Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-28 09:01:32 +01:00
Felix Conway
92efce2b84 [development] Remove code relating to MBEDTLS_PSA_INJECT_ENTROPY
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-28 09:01:05 +01:00
Manuel Pégourié-Gonnard
e57ea21a1c
Merge pull request #10042 from bjwtaylor/remove-ssl-conf
Remove mbedtls_ssl_conf_rng()
2025-03-27 14:05:42 +00:00
Ben Taylor
05a978752b Remove MBEDTLS_PK_RSA_ALT
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-27 09:53:46 +00:00
David Horstmann
06bdb16719
Merge pull request #10000 from bjwtaylor/remove-sample-programs
Delete some sample programs
2025-03-27 09:47:10 +00:00
Manuel Pégourié-Gonnard
df9491fe16
Merge pull request #10093 from mpg/2.28-eol-dev
The LTS branch 2.28 is now EOL
2025-03-27 09:47:00 +00:00
Ben Taylor
7a84f0f3a9 removed rng parameters from struct mbedtls_ssl_config
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-27 09:34:21 +00:00
Ronald Cron
f19a08fb96
Merge pull request #10062 from ronald-cron-arm/check-generated-files
Companion PR of "Add check generated files and check code style test components"
#201-merge==#201-head thus not updating the TF-PSA-Crypto pointer to #201-merge
#10062-merge==#10062-head and the merge queue is empty thus merging directly, not through the merge queue.
2025-03-27 10:24:06 +01:00
Ronald Cron
b9d7b5f165 Update TF-PSA-Crypto pointer
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
4cd8fbbb2d Use TF_PSA_CRYPTO_ROOT_DIR
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
aa5c159e36 all.sh: check generated files: Use make_generated_files.py
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
99226e9b9b cmake: Generate test_keys.h and test_certs.h in the build tree
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
81a674eee8 Adapt to generate_config_tests.py changes
Adapt builds and check-generated-files.sh to the fact
that generate_config_tests.py does not generate
test_suite_config.psa_boolean.data in Mbed TLS 4.x
context anymore.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
a1e1c2ce3c Update framework pointer
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
ddbf729ef7 Add directory and list arguments to generate_visualc_files.pl
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-03-26 21:19:28 +01:00
Ronald Cron
6bf29fd417
Merge pull request #10050 from valeriosetti/issue8151-development
[development] Remove the dynamic SE interface in 4.0
2025-03-26 17:07:00 +00:00
David Horstmann
82bac6e076
Merge pull request #1334 from davidhorstmann-arm/add-missing-credit
Add missing credit for `set_hostname` issue
2025-03-26 14:09:47 +00:00
Ben Taylor
cd2660fb0e fixed code style
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
8224e71262 remove NULL guard
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
c12152e53e corrected style
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
b9f83b3d07 Remove srand from fuzz
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
03c05c336e Remove additional line
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
fb68b8cf57 Remove empty ifdef
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
9774e9a176 corrected code style
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
1f091466c1 tidy up syntax
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00
Ben Taylor
1cd1e01897 Correct code style
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 13:34:03 +00:00