Skip to content

Commit 7ea9f1b

Browse files
Merge pull request #1426 from gilles-peskine-arm/restricted-mbedtls-merge-public-20250916
mbedtls: : merge public into restricted 2025-09-16
2 parents aa19698 + 2fe29ab commit 7ea9f1b

File tree

142 files changed

+936
-3619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+936
-3619
lines changed

CMakeLists.txt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,6 @@ option(USE_SHARED_MBEDTLS_LIBRARY "Build Mbed TLS shared library." OFF)
100100
option(LINK_WITH_PTHREAD "Explicitly link Mbed TLS library to pthread." OFF)
101101
option(LINK_WITH_TRUSTED_STORAGE "Explicitly link Mbed TLS library to trusted_storage." OFF)
102102

103-
# Warning string - created as a list for compatibility with CMake 2.8
104-
set(CTR_DRBG_128_BIT_KEY_WARN_L1 "**** WARNING! MBEDTLS_CTR_DRBG_USE_128_BIT_KEY defined!\n")
105-
set(CTR_DRBG_128_BIT_KEY_WARN_L2 "**** Using 128-bit keys for CTR_DRBG limits the security of generated\n")
106-
set(CTR_DRBG_128_BIT_KEY_WARN_L3 "**** keys and operations that use random values generated to 128-bit security\n")
107-
108-
set(CTR_DRBG_128_BIT_KEY_WARNING "${WARNING_BORDER}"
109-
"${CTR_DRBG_128_BIT_KEY_WARN_L1}"
110-
"${CTR_DRBG_128_BIT_KEY_WARN_L2}"
111-
"${CTR_DRBG_128_BIT_KEY_WARN_L3}"
112-
"${WARNING_BORDER}")
113-
114103
# Python 3 is only needed here to check for configuration warnings.
115104
if(NOT CMAKE_VERSION VERSION_LESS 3.15.0)
116105
set(Python3_FIND_STRATEGY LOCATION)
@@ -124,16 +113,6 @@ else()
124113
set(MBEDTLS_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
125114
endif()
126115
endif()
127-
if(MBEDTLS_PYTHON_EXECUTABLE)
128-
129-
# If 128-bit keys are configured for CTR_DRBG, display an appropriate warning
130-
execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls/mbedtls_config.h get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
131-
RESULT_VARIABLE result)
132-
if(${result} EQUAL 0)
133-
message(WARNING ${CTR_DRBG_128_BIT_KEY_WARNING})
134-
endif()
135-
136-
endif()
137116

138117
# We now potentially need to link all executables against PThreads, if available
139118
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)

ChangeLog.d/10285.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Removals
2+
* Removed all public key sample programs from the programs/pkey
3+
directory.

ChangeLog.d/check_config.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Removals
2+
* The header <mbedtls/check_config.h> no longer exists. Including it
3+
from a custom config file was no longer needed since Mbed TLS 3.0,
4+
and could lead to spurious errors. The checks that it performed are
5+
now done automatically when building the library.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix
2+
* Fix potential CMake parallel build failure when building both the static
3+
and shared libraries.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Removals
2+
* Remove MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT. Now only the
3+
standard version (defined in RFC 9146) of DTLS connection ID is supported.
4+
* Remove mbedtls_ssl_conf_min_version(), mbedtls_ssl_conf_max_version(), and
5+
the associated constants MBEDTLS_SSL_MAJOR_VERSION_x and
6+
MBEDTLS_SSL_MINOR_VERSION_y. Use mbedtls_ssl_conf_min_tls_version() and
7+
mbedtls_ssl_conf_max_tls_version() with MBEDTLS_SSL_VERSION_TLS1_y instead.
8+
Note that the new names of the new constants use the TLS protocol versions,
9+
unlike the old constants whose names are based on internal encodings.
10+
* Remove mbedtls_ssl_conf_sig_hashes(). Use mbedtls_ssl_conf_sig_algs()
11+
instead.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Removals
2+
* Remove mbedtls_pk_type_t from the public interface and replace it with
3+
mbedtls_pk_sigalg_t.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
API changes
2+
* Change the signature of the runtime version information methods that took
3+
a char* as an argument to take zero arguments and return a const char*
4+
instead. This aligns us with the interface used in TF PSA Crypto 1.0.
5+
If you need to support linking against both Mbed TLS 3.x and 4.x, please
6+
use the build-time version macros or mbedtls_version_get_number() to
7+
determine the correct signature for mbedtls_version_get_string() and
8+
mbedtls_version_get_string_full() before calling them.
9+
Fixes issue #10308.

ChangeLog.d/secp256k1-removal.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Removals
2+
* Support for secp192k1, secp192r1, secp224k1 and secp224r1 EC curves is
3+
removed from TLS.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Removals
2+
* Removed support for TLS 1.2 static ECDH key
3+
exchanges (ECDH-ECDSA and ECDH-RSA).

ChangeLog.d/unify-errors.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
API changes
2+
* Make the following error codes aliases of their PSA equivalents, where
3+
xxx is a module, e.g. X509 or SSL.
4+
MBEDTLS_ERR_xxx_BAD_INPUT_DATA -> PSA_ERROR_INVALID_ARGUMENT
5+
MBEDTLS_ERR_xxx_ALLOC_FAILED -> PSA_ERROR_INSUFFICIENT_MEMORY
6+
MBEDTLS_ERR_xxx_BUFFER_TOO_SMALL -> PSA_ERROR_BUFFER_TOO_SMALL
7+
MBEDTLS_ERR_PKCS7_VERIFY_FAIL -> PSA_ERROR_INVALID_SIGNATURE

0 commit comments

Comments
 (0)