1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-10-20 03:32:32 +03:00
Commit Graph

2944 Commits

Author SHA1 Message Date
Ben Taylor
c801d3293e include private pk.h internally
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-07-17 15:18:53 +01:00
Manuel Pégourié-Gonnard
d2c293bd0a Merge pull request #10115 from bjwtaylor/move-fuzz-progs
remove fuzz_privkey.c and fuzz_pubkey.c
2025-07-17 09:36:02 +00:00
Ari Weiler-Ofek
c3d54b619e Fix comment in dlopen.c to remove reference to deprecated API
Signed-off-by: Ari Weiler-Ofek <ari.weiler-ofek@arm.com>
2025-07-15 15:08:07 +01:00
Ari Weiler-Ofek
abcfd4c160 Modified dlopen.c and tfpsacrypto_dlopen.c so that they use PSA API-only dynamic loading
- Replaced soon-deprecated mbedtls_md_list() in dlopen.c with psa_hash_compute()
- Added tfpsacrypto_dlopen.c as a PSA-only shared-library loading test
- Enabled -fPIC for tf-psa-crypto builtins to support shared linking
- Confirmed clean builds and successful dlopen() test execution.

Signed-off-by: Ari Weiler-Ofek <ari.weiler-ofek@arm.com>
2025-07-15 15:08:07 +01:00
David Horstmann
ba2376c580 Merge pull request #10275 from ariwo17/remove-des-core-before-crypto
Remove DES from Mbed TLS core (except references blocked by TF PSA Crypto)
2025-07-09 09:52:31 +00:00
Ari Weiler-Ofek
86422e5509 Remove: DES selftest, component_test_psa_crypto_config_accel_des and dead DES mentions prior to TF-PSA-Crypto cleanup
Signed-off-by: Ari Weiler-Ofek <ariwei01@e134794.arm.com>
2025-07-07 11:29:50 +01:00
Ben Taylor
b8ebc21ea2 Correct typo
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
5578c06ab3 Remove duplicated slash
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
d9fc98a569 Correct CFLAGS path int Makefile
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
56d54c6349 Remove fuzz progs from Makefile
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
c9b7175a68 Add in fuzz path variable
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
d6cc47e450 Add some name changes in to allow merge
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
80490a2f1a Revert some changes to allow merge
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
946b0d982a Corrected windows paths
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
9784b40ba7 Remove wildcard as it is no longer required
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
38b063a91e add fix to fuzz makefile for windows
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
7287040587 fixed issue with binary cleanup in fuzz programs
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
c42f5d4c90 added fix for Makefile in fuzz programs
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:36 +01:00
Ben Taylor
aa5aa47aa5 corrected Makefile path for fuzz progs
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Ben Taylor
a59cef43f2 add fixes for the fuzz Make system
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Ben Taylor
dc027791e9 update common. to fuzz_common.h
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Ben Taylor
eea3ddaf2c corrected cmake path
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Ben Taylor
2584eaddf9 add fix for fuzz Makefile for new common path
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Ben Taylor
107b21ce53 removed common.* from programs/fuzz
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Ben Taylor
dd27691c61 remove fuzz_privkey.c and fuzz_pubkey.c
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-06-30 11:31:35 +01:00
Minos Galanakis
ed87da7ad7 Merge remote-tracking branch 'restricted/development-restricted' into future_rc
As set by process the tf-psa-crypto submodule is set
to point to tf-psa-crypto-release-sync input.
2025-06-27 10:50:33 +01:00
Ronald Cron
d1e4ccf0a0 cmake: Fix library order
A library that depends on another one should come first
in the list of libraries to link against.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-06-17 09:48:05 +02:00
Ronald Cron
a3b562aa17 programs: test: Let zeroize be an Mbed TLS test program
In TF-PSA-Crypto there is the crypto specific one.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-06-16 15:55:05 +02:00
Ronald Cron
0815c67ce1 programs: pkey: Use tf-psa-crypto/build_info.h
pkey programs are crypto programs (only linked to
the TF-PSA-Crypto library) thus use the TF-PSA-Crypto
build-time configuration info file
tf-psa-crypto/build_info.h instead of the Mbed TLS one.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-06-16 15:54:49 +02:00
Valerio Setti
a81d6dfb05 tests|programs: remove usage of mbedtls_ecp_set_max_ops()
PK restartable operations are now implemented using PSA interruptible
ones, so mbedtls_ecp_set_max_ops() can be removed in favor of
psa_interruptible_set_max_ops().

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-06-12 06:39:18 +02:00
Manuel Pégourié-Gonnard
cdd91da1af Merge pull request #10145 from gabor-mezei-arm/remove_sha3_config_option
Remove `MBEDTLS_SHA3_C` config option
2025-06-10 09:57:22 +00:00
Gabor Mezei
4aa974f7c7 Remove MBEDTLS_SHA3_C config option
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-06-03 17:49:23 +02:00
Manuel Pégourié-Gonnard
a4ffc4e4c6 Merge remote-tracking branch 'public/development' into development-restricted
* public/development: (23 commits)
  tests: suite_x509parse: set PSA max operations in x509_verify_restart()
  library: debug: remove mbedtls_debug_printf_ecdh()
  library: debug: make mbedtls_debug_print_psa_ec() static
  Remove call to pk_decrypt() in ssl_server2
  Change hardcoded error values in ssl-opt to take in the PSA error alias
  Test with GCC 15 with sloppy union initialization
  Update crypto with the union initialization fixes
  Mark ssl_tls12_preset_suiteb_sig_algs const
  Mark ssl_tls12_preset_default_sig_algs const
  Use PSA macros for the `pkalgs` domain
  reverted compat-2.x.h removal from psa-transition.md
  Correct ChangeLog file extension
  Add ChangeLog
  remove compat-2.x.h
  Remove trace of secp224k1
  Update submodules
  Improve comments
  Allow gcc-15 to be in $PATH
  Enable drivers when testing with GCC 15
  GCC 15: Silence -Wunterminated-string-initialization
  ...
2025-05-28 12:41:28 +02:00
Valerio Setti
7f363dfe62 programs: ssl_client2: set max restartable op also in PSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2025-05-27 11:59:32 +02:00
Manuel Pégourié-Gonnard
6b8f517e4d Avoid a useless copy in cert_{req,write}
I'm just trying to have a shorter name to avoid repeating a long
expression. This is a job for a pointer, not copying a struct.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-21 11:53:59 +02:00
Manuel Pégourié-Gonnard
bb8c0aba74 Add comment on apparent type mismatch
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-21 11:53:59 +02:00
Manuel Pégourié-Gonnard
8de781d99d Remove redundant free loop
This version is incomplete. I failed to noticed it when adding a more
complete version, making the existing one redundant.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-21 11:53:59 +02:00
Manuel Pégourié-Gonnard
92a9bd345c Remove call to pk_decrypt() in ssl_server2
We no longer use decrypt TLS 1.2 (never did in 1.3) so we no longer need
this path. Further simplifications could probably be made (we currently
have an enum type with only one possible value...) but for now I'm
trying to keep changes minimal.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-20 12:04:26 +02:00
Manuel Pégourié-Gonnard
b095862722 Fix memory leak in cert_write & cert_req
That memory leak had been present ever since the san command-line
argument has been added.

Tested that the following invocation is now fully valgrind clean:

programs/x509/cert_write san=DN:C=NL,CN=#0000,CN=foo;DN:CN=#0000,O=foo,OU=bar,C=UK;IP:1.2.3.4;IP:4.3.2.1;URI:http\\://example.org/;URI:foo;DNS:foo.example.org;DNS:bar.example.org

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-12 12:34:11 +02:00
Manuel Pégourié-Gonnard
6b1147993c Fix runtime error in cert_write & cert_req
The runtime error was introduced two commits ago (while avoiding a
use-after-free). Now the programs run cleanly but still leak memory.

The memory leak is long pre-existing and larger than just DN components
(which are made temporarily slightly worse by this commit) and will be
fixed properly in the next commit.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-12 12:34:11 +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
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
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
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
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
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
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