curl-curl/m4
Viktor Szakats 3a305831d1
mbedtls: add support for 4.0.0
After this patch libcurl requires (as already documented)
the `curl_global_init()` call when using the `curl_formadd()` API with
mbedTLS.

Note: NTLM is not supported with mbedTLS 4+, because it lacks
the necessary crypto primitive: DES.

Also:
- lib: de-dupe mbedTLS minimum version checks into `curl_setup.h`.
- lib: initialize PSA Crypto as part of `curl_global_init()`.
  For MD5, SHA-256, `curl_formadd()`, and MultiSSL builds with mbedTLS
  but where mbedTLS isn't the default backend.
- lib1308: fix to call `curl_global_init()` (for the Form API).
- curl_ntlm_core: disable with mbedTLS 4+.
- md4: disable mbedTLS implementation when building against 4.x.
- md5: use mbedTLS PSA Crypto API when available, otherwise use
  the default local implementation.
- sha256: use mbedTLS PSA Crypto API when available, otherwise use
  the default local implementation.
- vtls/mbedtls: drop PSA Crypto initialization in favor of
  `curl_global_init()`.
- vtls/mbedtls: use PSA Crypto random API with all mbedTLS versions.
- vtls/mbedtls: do the same for the SHA-256 callback.
- autotools: detect mbedTLS 4+, and disable NTLM for 3.x.
- cmake: disable NTLM for mbedTLS 3.x.
- GHA/linux: keep building mbedTLS 3.x manually and use it in
  an existing job, while also enabling pytest in it.
- GHA/linux: bump to mbedTLS 4.0.0.
  Closes #19075
  Closes #19074

Refs:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.0.0
https://github.com/Mbed-TLS/mbedtls/blob/mbedtls-4.0.0/docs/4.0-migration-guide.md
https://github.com/Mbed-TLS/mbedtls/blob/mbedtls-4.0.0/tf-psa-crypto/docs/1.0-migration-guide.md [404]
https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/tf-psa-crypto-1.0.0/docs/1.0-migration-guide.md
https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/tf-psa-crypto-1.0.0/docs/psa-transition.md
627f727bbe/docs/4.0-migration-guide

Closes #19077
2025-10-17 11:50:48 +02:00
..
.gitignore tidy-up: .gitignore lines mostly 2025-01-27 20:59:46 +01:00
curl-amissl.m4 Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
curl-apple-sectrust.m4 apple sectrust: add to features 2025-10-16 10:58:45 +02:00
curl-compilers.m4 build: address some -Weverything warnings, update picky warnings 2025-09-20 10:16:15 +02:00
curl-confopts.m4 build: do not apply curl debug macros to tests/server by default 2025-03-14 12:59:32 +01:00
curl-functions.m4 autotools: make --enable-code-coverage support llvm/clang 2025-09-20 01:28:35 +02:00
curl-gnutls.m4 build: drop unused feature macros, update exception list 2024-12-16 18:05:24 +01:00
curl-mbedtls.m4 mbedtls: add support for 4.0.0 2025-10-17 11:50:48 +02:00
curl-openssl.m4 autotools: drop detection of ancient OpenSSL libs RSAglue and rsaref 2025-10-16 16:19:05 +02:00
curl-override.m4 build: fix compiler warnings in feature detections 2025-02-16 02:39:35 +01:00
curl-reentrant.m4 lib: use Curl_str_* instead of strtok_r() 2025-02-17 13:18:28 +01:00
curl-rustls.m4 autotools: capitalize 'Rustls' in the log output 2025-09-22 10:11:31 +02:00
curl-schannel.m4 schannel: not supported with UWP, drop redundant code 2025-07-31 20:05:32 +02:00
curl-sysconfig.m4 cmake: fix to restrict SystemConfiguration to macOS 2025-08-03 23:35:28 +02:00
curl-wolfssl.m4 build: link to Apple frameworks required by static wolfSSL 2025-07-18 00:54:34 +02:00
xc-am-iface.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
xc-cc-check.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
xc-lt-iface.m4 autotools: stop checking for the pw32 platform 2025-07-15 18:43:12 +02:00
xc-val-flgs.m4 configure: fix indentation more 2024-08-26 11:14:01 +02:00
zz40-xc-ovr.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
zz50-xc-ovr.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
zz60-xc-ovr.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00