1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-06-23 21:50:34 +08:00

33322 Commits

Author SHA1 Message Date
Deomid rojer Ryabkov
7dddc1724f Mark ssl_tls12_preset_suiteb_sig_algs const
Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
2025-05-15 15:27:40 +03:00
Deomid rojer Ryabkov
e2d71ccc64 Mark ssl_tls12_preset_default_sig_algs const
To place in flash and save RAM on targets where this applies.

Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
2025-05-15 15:27:40 +03:00
Manuel Pégourié-Gonnard
7769c16512
Merge pull request #9654 from gabor-mezei-arm/9145_update_depends.py_pkalgs_domain
Update the `pkalgs` domain to use PSA macros in `depends.py`
2025-05-14 08:38:24 +00:00
Gilles Peskine
49b7ef635f
Merge pull request #10166 from gilles-peskine-arm/oid-split-restore-x509
Restore the OID module for use in X.509
2025-05-12 07:59:55 +00:00
Gabor Mezei
f13fd1e272
Use PSA macros for the pkalgs domain
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-05-09 14:51:54 +02:00
Ben Taylor
e718e835ee reverted compat-2.x.h removal from psa-transition.md
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-05-08 14:55:44 +01:00
Ben Taylor
d056136a4d Correct ChangeLog file extension
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-05-08 14:55:44 +01:00
Ben Taylor
4c9ad3cfe6 Add ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-05-08 14:55:44 +01:00
Ben Taylor
e23afdd765 remove compat-2.x.h
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-05-08 14:55:44 +01:00
Gilles Peskine
46771ff0d6 Remove trace of secp224k1
The curve secp224k1 was supported in the legacy API in Mbed TLS <=3.6, but
removed after 3.6, and was never implemented in PSA. Remove this old trace
of it.

This is a partial cherry-pick of 32c82f0c369117b22d8a40e51723c364156d1aff

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 19:17:35 +02:00
Gilles Peskine
dcff079ea4 Update submodules
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:16:20 +02:00
Gilles Peskine
d0e799ad8b Improve comments
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:15:37 +02:00
Gilles Peskine
d69bfb9044 Allow gcc-15 to be in $PATH
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:15:37 +02:00
Gilles Peskine
27f0713988 Enable drivers when testing with GCC 15
The goal of testing with GCC 15 is to validate fixes for
https://github.com/Mbed-TLS/mbedtls/issues/9814 . The bug is present in
multiple places, and some of them affect third-party drivers but not our
built-in implementation. (The bug is that driver contexts might not be
zero-initialized, but some of our built-in implementations happen not to
care about this.) Thus, enable the test drivers in the test component that
uses GCC 15, to gain the extra checks performed in the driver wrappers.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:15:37 +02:00
Gilles Peskine
6e245040d4 GCC 15: Silence -Wunterminated-string-initialization
This is a new warning in GCC 15 that our code base triggers in many places.
Silence it for the time being.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:15:37 +02:00
Gilles Peskine
579475d5d3 Test with GCC 15
Non-regression for https://github.com/Mbed-TLS/mbedtls/issues/9814

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:15:37 +02:00
Gilles Peskine
06af417cea Disable warning from gcc -pedantic on dlsym/dlopen
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 17:15:37 +02:00
Gilles Peskine
1782587af2
Merge pull request #10130 from valeriosetti/issue8154-development
[development] Restrict MBEDTLS_X509_RSASSA_PSS_SUPPORT
2025-05-07 14:22:34 +00:00
Gilles Peskine
1876efc157 Merge remote-tracking branch 'development' into HEAD 2025-05-07 14:41:13 +02:00
Gilles Peskine
47c8579ed0 Copy OID files that are getting moved to tf-psa-crypto
The OID module is used by both crypto and X.509. It has moved to the
`tf-psa-crypto` subdirectory, and the sibling commit
08d8cc57dbe7be54fe3f88ecbc2729300c48d450 removes this subdirectory from the
`mbedtls` repository in order to make `tf-psa-crypto` a submodule. We want
to access the relevant parts directly from X.509 rather than go through the
crypto repository, because OID functions are only accessible as private
interfaces, and crypto doesn't know when a particular OID function is needed
in the build since it depends on X.509 configuration options.

Make a copy of the OID module and its unit tests. In a follow-up, the X.509
module will switch to consuming this copy rather than the one that went into
TF-PSA-Crypto.

Rename the files from `*oid*` to `*x509_oid*` to follow the naming
convention that submodules of X.509 are prefixed with `x509`. This also
avoids file name clashes with TF-PSA-Crypto.

Since OID is not a public interface of Mbed TLS 4.x, move the header file
into `library`.

This commit only makes the files available. Subsequent commits will take
care of making these files used in the build.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-07 14:35:04 +02:00
Valerio Setti
b8d5649ab6 tests: test_suite_x509: adapt RSA-PSS tests
Parsing of CRT files with message's hash alg different from the MGF1 was
allowed in the past, but now it fails. So we need to move/adapt tests
relying on this feature, from a "verify" scope to a "parse" one.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-07 09:06:52 +02:00
Valerio Setti
7f6f4e6907 library: pass NULL options parameter to mbedtls_pk_verify_ext()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-07 09:06:52 +02:00
Valerio Setti
d24dfad7af library: x509: remove sig_opts from mbedtls_x509_sig_alg_gets()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-07 09:06:52 +02:00
Valerio Setti
68878ccdd0 library: x509: simplify RSA-PSS management
- Do not store RSA-PSS signature options in CRL/CRT/CSR structures;
- During the parsing phase, just ensure that MGF1 hash alg is the same
  as the one used for the message.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-07 09:06:52 +02:00
Gilles Peskine
2439c4c14a
Merge pull request #10090 from valeriosetti/issue9618-development
[development] MBEDTLS_PLATFORM_GET_ENTROPY_ALT in 4.0
2025-05-06 22:35:03 +02:00
Valerio Setti
7f8b7b768b tf-psa-crypto: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-06 18:30:15 +02:00
Valerio Setti
55fa875574 framework: update reference
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-06 06:28:35 +02:00
Valerio Setti
1afedacfea tests: scripts: add new component to configuration-platform.sh
Import component_test_platform_get_entropy_alt() from its counterpart
in TF-PSA-Crypto repo.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-06 06:28:35 +02:00
David Horstmann
05027f23ce Fix bug in bump_version.sh
This had not been updated after test_suite_version was moved back to
mbedtls from TF-PSA-Crypto.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-05-02 11:41:19 +01:00
Gilles Peskine
5f6c6334f8
Merge pull request #10157 from diopoex/development
Remove use of mbedtls_md_get_name() from ssl_context_info.c
2025-04-30 07:00:01 +00:00
Paul Höhn
02c80e631f
Fix test and formatting in ssl_context_info
Signed-off-by: Paul Höhn <paul.hoehn@icloud.com>
2025-04-29 22:02:24 +02:00
Paul Höhn
e38041673f
fixed the tests
Signed-off-by: Paul Höhn <paul.hoehn@icloud.com>
2025-04-29 18:53:07 +02:00
Paul Höhn
5a7a5305e8
removed trailing whitespace
Signed-off-by: Paul Höhn <paul.hoehn@icloud.com>
2025-04-29 18:53:07 +02:00
Paul Höhn
da95274730
ssl context fix for 4.0
Signed-off-by: Paul Höhn <paul.hoehn@icloud.com>
2025-04-29 18:53:07 +02:00
Valerio Setti
0f0304d433 scripts: tests: fix component_test_full_cmake_clang
Use the proper Clang C++ compiler to build C++ code otherwise the C
compiler will fail because std::cout() is unknown in
"cpp_dummy_build.cpp".

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
7fb7fdabd7 tests: scripts: fix component_test_no_platform()
Use alternative implementation of mbedtls_platform_get_entropy() since
the default one lives in "platform.c" and that one is excluded in
this test component.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
1971eab465 programs: test: add C++ specific commands to cpp_dummy_build
Add C++ specific instructions to the generated *.cpp source file so
that the build will fail in case a C compiler is used.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
b13d29ebb2 tests: scripts: fix test_cmake_out_of_source
By default C++ code would be compiled with GNU while C with Clang and
this can create problems at link time. In order to prevent this we
use Clang for both.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
7ac11845d0 configs: add PLATFORM_C to configs using ENTROPY_C
This is necessary to let entropy being able to gather entropy data from
the native platform source.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
3775c9b48f programs: selftest: remove direct call to mbedtls_platform_entropy_poll()
The function is now internal so it cannot be referenced from programs.
A dummy alternative is used instead.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
73bd210a94 tests: remove usage of MBEDTLS_NO_PLATFORM_ENTROPY
Use MBEDTLS_PLATFORM_GET_ENTROPY_ALT instead.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
405d4adff2 psasim: add timeout while waiting for psa_server to start
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Valerio Setti
c568688456 config.py: do not enable MBEDTLS_PLATFORM_GET_ENTROPY_ALT in full config
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-04-29 11:01:46 +02:00
Manuel Pégourié-Gonnard
0fe9277fec
Merge pull request #9983 from bjwtaylor/kw-api-rework
Move NIST_KW to PSA API
2025-04-29 08:53:51 +00:00
Ben Taylor
1948c94385 added dependencies to test scripts
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-04-29 07:43:37 +01:00
Ben Taylor
4695204872 remove mbedtls_nist_kw_self_test from selftests
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-04-29 07:43:37 +01:00
Gilles Peskine
748e24d78e
Merge pull request #10143 from diopoex/development
Removed use of mbedtls_cipher_info from ssl_context_info.c
2025-04-28 12:35:12 +00:00
David Horstmann
4f4a2b3fc3
Merge pull request #10146 from gilles-peskine-arm/pylint-check-str-concat-dev
Pylint: Complain about a missing comma in multiline lists of strings
2025-04-28 09:11:57 +00:00
David Horstmann
ad6953f788
Merge pull request #10114 from felixc-arm/switch-to-which-aes
Switch all.sh components from selftest to which_aes
2025-04-28 06:58:38 +00:00
Gilles Peskine
8893a8f33b Complain about a missing comma in multiline lists of strings
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-04-25 12:52:16 +02:00