Commit Graph

33542 Commits

Author SHA1 Message Date
Ben Taylor
6bcdd67f83 Update ssl progs to restore build
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-30 07:55:14 +01:00
Ben Taylor
4bb98be277 initial remove of MBEDTLS_USE_PSA_CRYPTO
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-30 07:55:13 +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
bebe631b7f Merge pull request #10329 from valeriosetti/issue345-development
[development] Define MBEDTLS_PK_ALG_ECDSA (1/2)
2025-07-29 11:53:53 +00:00
Valerio Setti
cd1b7ffa70 tests: x509write: replace MBEDTLS_ECDSA_DETERMINISTIC with PSA_WANT one
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-07-29 10:40:12 +02:00
Gilles Peskine
fff4b32324 Announce that <mbedtls/check_config.h> no longer exists
It was already deprecated since 3.0 (although we forgot to announce it in
the changelog back then).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-28 15:46:06 +02:00
Gilles Peskine
01def64425 Unit tests for check_config.h
Ensure that `mbedtls_check_config.h` is taken into account.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-28 15:46:06 +02:00
Gilles Peskine
aca3b5ec79 Update framework with unittest_config_checks.py
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-28 15:46:01 +02:00
Gilles Peskine
1819a915bc Include limits.h where needed
This will be needed when TF-PSA-Crypto's `build_info.h` stops including
`limits.h`, which it currently does by accident because it includes
`check_config.h` which wants `limits.h` to check `CHAR_BIT`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-28 15:45:12 +02: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
Gilles Peskine
018e09872d New source file for configuration checks
This will be populated in subsequent commits.

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
bb8bafa5e5 Pacify uncrustify
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-26 00:23:05 +02:00
Gilles Peskine
4995d4435c Don't incude auxiliary headers that have alternative versions
When compiling with `MBEDTLS_PSA_CRYPTO_PLATFORM_FILE`, we must not include
`<psa/crypto_platform.h`. Same with `MBEDTLS_PSA_CRYPTO_STRUCT_FILE` and
`<psa/crypto_struct.h>`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-26 00:19:32 +02:00
Gilles Peskine
409c688c4b Include mbedtls/platform_time.h conditionally on MBEDTLS_HAVE_TIME
Work around https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/393

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-26 00:17:57 +02: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
Gilles Peskine
8b006ce95f Invoke generate_query_config.pl from the root
Otherwise it can't find headers to include.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-25 19:51:17 +02:00
Gilles Peskine
c0a562c895 query_config.fmt: glob headers instead of listing them explicitly
This lets us remove or rename crypto headers without hassle, and means we
don't risk forgetting to add a new header.

Fix #10323

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-25 18:12:37 +02:00
Ronald Cron
b23424cc61 Merge pull request #10317 from ronald-cron-arm/legacy-crypto-options-cleanup
Clean-up following the removal of crypto config options but ECC ones
2025-07-25 15:11:34 +00:00
Gilles Peskine
3bb528d47d Merge pull request #10205 from bjwtaylor/move-fuzz-progs-2
Tidy Up Dependencies and Paths
2025-07-25 13:21:09 +00:00
Gilles Peskine
a4bd67f3e7 Merge pull request #10274 from bjwtaylor/rename-mbedtls_pk_setup_opaque
Rename mbedtls_pk_setup_opaque to mbedtls_pk_wrap_psa
2025-07-25 13:20:42 +00:00
Ben Taylor
02c76ebb21 Add minor corrections to the fuzz Makefile
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 11:13:23 +01:00
Ben Taylor
361ce2b484 Rename mbedtls_pk_setup_opaque to mbedtls_pk_wrap_psa
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 08:25:28 +01:00
Ben Taylor
250e8b8b6d Update submodule pointer
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 07:55:43 +01:00
Ben Taylor
4e85cbd227 update submodules to pull in previous PR's
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 07:51:35 +01:00
Ben Taylor
8beeed0462 Add further updates to paths
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 07:51:35 +01:00
Ben Taylor
60a5b32198 Correct onefile name
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 07:51:35 +01:00
Ben Taylor
52510b27fc Update header names
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 07:51:35 +01:00
Ben Taylor
c7c480a95f Revert temporary merge changes
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-24 07:51:35 +01:00
Ronald Cron
5eb9aba358 mbedtls_config.h: Update "requires" comments
Following the removal of the legacy hash, cipher,
CMAC, AEAD, and RSA configuration options in
TF-PSA-Crypto, update the "requires" comments that
referred to the removed options.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
dfd501d3fb depends.py: Adapt to the removal of legacy crypto config options
Adapt to the removal of the legacy hash, cipher,
cmac, aead and RSA configuration options.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
fb03d1391b depends.py: Remove cipher_padding domain
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
0668036ada Replace MBEDTLS_AES_C
Replace the remaining instances of MBEDTLS_AES_C
as a configuration option.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
e13c7015ea all.sh: Remove unset of now removed legacy symmetric crypto options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
892bb61294 all.sh: Remove unset of now removed legacy RSA config options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
8719c2f00b ssl_misc.h: Update PKCS1 dependencies
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Ronald Cron
772a8ad219 all.sh: Remove unset of now removed legacy hash config options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-24 08:42:16 +02:00
Bence Szépkúti
722d982ab7 Merge pull request #10309 from bensze01/rename-tf-psa-crypto-common.h
Rename tf-psa-crypto/core/common.h
2025-07-23 14:27:00 +00:00
Bence Szépkúti
89becc987f Update framework submodule
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-07-23 00:34:08 +02:00
Bence Szépkúti
e6167e7a51 Update tf-psa-crypto submodule
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-07-23 00:34:01 +02:00
Bence Szépkúti
27125ceacf Update references to tf-psa-crypto/core/common.h
This commit was generated using the following command:

sed -i 's/\(^\|[^_]\)common\.h/\1tf_psa_crypto_common.h/g' \
    $(git ls-files .                                       \
        ':!:programs/fuzz'                                 \
        ':!:tests/psa-client-server'                       \
        ':!:tf-psa-crypto'                                 \
        ':!:framework')                                    \
    $(git grep -l 'tf-psa-crypto/core/common.h')

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-07-21 20:02:30 +02:00
Gilles Peskine
f2d4cbbb0e Merge pull request #10276 from bjwtaylor/switch-to-mbedtls_pk_verify_new
Switch to mbedtls_pk_verify_new
2025-07-21 14:57:05 +00:00
Ben Taylor
5be8511151 Fix too many arguments in mbedtls_pk_verify_new
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-21 07:53:15 +01:00
Ben Taylor
0c787e3de8 Remove additional calls to mbedtls_pk_verify_ext
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-21 07:53:15 +01:00
Ben Taylor
0de87611bb Remove additional calls to mbedtls_pk_verify_ext
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-21 07:53:15 +01:00
Ben Taylor
306ffd3a36 Switch to mbedtls_pk_verify_new
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-21 07:53:15 +01:00
Ronald Cron
b5fd7b9a54 Merge pull request #10295 from gilles-peskine-arm/nv-seed-only-prepare-mbedtls
Allow builds with no RNG but entropy in an NV seed: prepare Mbed TLS
2025-07-18 11:56:41 +00:00
Gilles Peskine
4e9d91005f Merge pull request #10272 from bjwtaylor/include-private-pk
include private pk.h internally
2025-07-18 05:20:27 +00:00
Bence Szépkúti
bdc0901f01 Merge pull request #10307 from amtkarm1/private-access-err-fix
Added a fix for the CI failure due to private access error
2025-07-17 21:49:04 +00:00
Ben Taylor
1030f80a0b Add private include to additional files
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-17 15:22:08 +01:00