1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-10-20 21:50:48 +08:00
Commit Graph

7187 Commits

Author SHA1 Message Date
Gilles Peskine
24d058bc6c Enable checks for bad options in the config file
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-24 17:20:35 +02:00
Gilles Peskine
67f54d2213 Have the definition of MBEDTLS_CONFIG_VERSION uncommented by default
Checking through the history in https://github.com/Mbed-TLS/mbedtls/pull/4589,
this seems to have been what we intended from the start. But we couldn't do
it yet because the library version was still 2.x while the config version
was already 3.0, so we temporarily commented out the definition in
1cafe5ce20. But then we forgot to uncomment
it during the release since it wasn't part of any process.

Thinking about it independently of the history, I think it makes more sense
to have it uncommented by default. That way, if someone copies the config
from a given version and then keeps it around, they'll get the compatibility
mode for that version.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-19 10:52:35 +02:00
Ronald Cron
46acbcda84 Merge pull request #10404 from gilles-peskine-arm/config-version-4.0
Increment config version for the new product major version
2025-09-18 09:59:08 +00:00
Gilles Peskine
ff5d117df8 Increment config version for the new product major version
Since we're making incompatible changes to the configuration, we really
should advance the configuration version.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-17 21:18:39 +02:00
Ronald Cron
3091e40774 Remove usage of old crypto options in public headers
The remaining occurences were related to
dead code.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-17 16:06:31 +02:00
Ronald Cron
4fe3760a27 Cleanup following the removal of MBEDTLS_BIGNUM_C option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
feb5e26619 Cleanup following the removal of MBEDTLS_ECP_DP_.*_ENABLED options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
2ad1e5c1a2 Cleanup following the removal of MBEDTLS_ECJPAKE_C option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
3c6bbddfd4 Cleanup following the removal of MBEDTLS_ECDSA_C option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
a19ee2819e Cleanup following the removal of MBEDTLS_ECDH_C option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
919a1e4e22 Cleanup following the removal of RSA legacy options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
0dd31fe523 Introduce MBEDTLS_SSL_NULL_CIPHERSUITES
The support for TLS ciphersuites without
encryption does not rely anymore on the
MBEDTLS_CIPHER_NULL_CIPHER feature of
the cipher module. Introduce a specific
config option to enable these ciphersuites
and use it instead of MBEDTLS_CIPHER_NULL_CIPHER.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ben Taylor
5cdbe30804 replace MBEDTLS_KEY_EXCHANGE_SOME_NON_PFS_ENABLED with MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
After the ECDH keyexchange removal the two became synonyms so the former can
be removed.

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
4766a23f9c change MBEDTLS_KEY_EXCHANGE_SOME_NON_PFS_ENABLED to MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
c8823a262d Remove MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED as it appears to be causing issues
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
a7b3f26864 reverted change to MBEDTLS_KEY_EXCHANGE_SOME_NON_PFS_ENABLED, as it appears it could be causing issues
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
b2f6a69d85 Replace MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED with MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
013f8aee4e Replace MBEDTLS_KEY_EXCHANGE_PSK_ENABLED with MBEDTLS_KEY_EXCHANGE_SOME_NON_PFS_ENABLED
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
1d651cc8a1 Remove additional occurances of static ECDH symbols
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
3116f2febe Remove further symbols
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
4d7f715c07 Remove further symbols that are not required
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
558766d814 Remove additional ifdef's
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ben Taylor
15f1d7f812 Remove support for static ECDH cipher suites
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-11 13:22:40 +01:00
Ronald Cron
a450affbca Fix MBEDTLS_SSL_TLS1_2_SOME_ECC definition
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-08 15:40:12 +02:00
Gilles Peskine
fda51526b5 Merge pull request #10363 from felixc-arm/error-codes-prereq
[1/3] Unify generic error codes (partial prerequisite)
2025-08-29 11:04:53 +00:00
Anton Matkin
bb7b2b765f Fixed the mbedtls installation cmake: now private headers, which are used in the installation, are included in it too
Signed-off-by: Anton Matkin <anton.matkin@arm.com>
2025-08-29 08:04:35 +02:00
Anton Matkin
4e091786ca Moved the MbedTLS config adjust headers to a private subdirectory
Signed-off-by: Anton Matkin <anton.matkin@arm.com>
2025-08-29 07:05:40 +02:00
Anton Matkin
bc48725b64 Include fixups (headers moves to private directory)
Signed-off-by: Anton Matkin <anton.matkin@arm.com>
2025-08-29 07:05:37 +02:00
Felix Conway
a01ddf65b7 Revert unification for some error codes
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-08-28 17:39:10 +01:00
David Horstmann
6ff9c89648 Merge pull request #10361 from bensze01/runtime-version-interface
Simplify runtime version info string methods
2025-08-27 14:59:15 +00:00
Felix Conway
37ede2c3b4 Unify generic errors to PSA errors
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-08-18 14:46:39 +01:00
Ben Taylor
3f523748e0 Add const to serial argument in mbedtls_x509write_crt_set_serial_raw
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-18 13:47:50 +01:00
Bence Szépkúti
b2ba9fa68b Simplify runtime version info string methods
Return a const char* instead of taking a char* as an argument.

This aligns us with the interface used in TF PSA Crypto.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-08-18 11:39:45 +02:00
Manuel Pégourié-Gonnard
5b74c79f00 Merge pull request #10298 from bjwtaylor/remove-deprecated-items
Remove deprecated items
2025-08-11 07:13:08 +00:00
Gilles Peskine
627d653863 Merge pull request #10282 from bjwtaylor/switch-to-mbedtls_pk_sigalg_t
Switch to mbedtls pk sigalg t
2025-08-07 11:06:31 +00:00
Ben Taylor
b2eecc621d switch to mbedtls_pk_sigalg_t
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-07 08:25:52 +01:00
Valerio Setti
d0d0791aed remove usage of secp192[k|r]1 curves
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-08-06 09:15:35 +02:00
Valerio Setti
70a4a31cb5 remove secp224[k|r]1 curves
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-08-06 09:15:35 +02:00
Ben Taylor
8b5c5b4daa Remove mbedtls_ssl_sig_hash_set_t as it is no longer required
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-05 08:20:32 +01:00
Ben Taylor
9ff2b73636 Change referenc funtion to include/mbedtls/ssl.h in note
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-05 08:17:13 +01:00
Ben Taylor
543caa7ec4 Re-add note
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-05 08:16:12 +01:00
Ben Taylor
27a4cc9de2 Remove mbedtls_ssl_conf_sig_hashes from comments
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-04 15:13:34 +01:00
Ben Taylor
73de8aa8c6 Removal of sig_hashes in ssl.h
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-01 11:45:14 +01:00
Ben Taylor
01bf8bafcd removed mbedtls_ssl_conf_sig_hashes and temporarily re-add sig_hashes
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-01 11:45:14 +01:00
Ben Taylor
d2da53fbe6 Remove further deprecated items
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-01 11:45:14 +01:00
Ben Taylor
4a43804d69 Remove deprecated items
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-08-01 11:45:14 +01:00
Gilles Peskine
d6f881e8ca Merge pull request #10319 from gilles-peskine-arm/move-check-config-to-library
check_config.h: move to library and test
2025-07-29 14:07:33 +00:00
Gilles Peskine
ac637ac9f8 Make check_config.h private
`check_config.h` only needs to run once on the configuration. It doesn't
need to run every time an application is built. It used to be public up to
Mbed TLS 2.x because it was included from `config.h`, and users could
substitute that file completely and should still include `check_config.h`
from their file. But since Mbed TLS 3.x, including `check_config.h` is a
purely internal thing (done in `build_info.h`). So make the file itself
purely internal.

We don't need to include `check_config.h` when building every library file,
just one: `mbedtls_config.c`, that's its job.

Give the file a unique name, to avoid any clashes with TF-PSA-Crypto's
`check_config.h`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-28 15:45:12 +02:00
minosgalanakis
d103046a59 Merge pull request #10324 from gilles-peskine-arm/query_config-glob-headers
query_config.fmt: glob headers instead of listing them explicitly
2025-07-28 13:25:51 +00:00
Gilles Peskine
1b4bfdf554 Add missing include
Fix compilation error when `mbedtls/oid.h` is included without having first
included `mbedtls/asn1.h`. Fix #10326

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-26 00:07:50 +02:00