Skip to content

Commit 3f95d30

Browse files
committed
rebase with lastest development branch
2 parents d5e8a48 + 7b1be55 commit 3f95d30

File tree

231 files changed

+10190
-3921
lines changed

Some content is hidden

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

231 files changed

+10190
-3921
lines changed

BRANCHES.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ At any point in time, we have a number of maintained branches, currently consist
1212
- One or more long-time support (LTS) branches: these only get bug fixes and
1313
security fixes. Currently, the only supported LTS branch is:
1414
[`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28).
15-
- For a short time we also have the previous LTS, which has recently ended its
16-
support period,
17-
[`mbedtls-2.16`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.16).
18-
This branch will move into the `archive` namespace around the time of
19-
the next release.
2015

2116
We retain a number of historical branches, whose names are prefixed by `archive/`,
2217
such as [`archive/mbedtls-2.7`](https://github.com/Mbed-TLS/mbedtls/tree/archive/mbedtls-2.7).
@@ -28,14 +23,22 @@ the API of 3.(x+1) is backward compatible with 3.x). We only break API
2823
compatibility on major version changes (e.g. from 3.x to 4.0). We also maintain
2924
ABI compatibility within LTS branches; see the next section for details.
3025

31-
## Backwards Compatibility
26+
## Backwards Compatibility for application code
3227

3328
We maintain API compatibility in released versions of Mbed TLS. If you have
3429
code that's working and secure with Mbed TLS x.y.z and does not rely on
3530
undocumented features, then you should be able to re-compile it without
3631
modification with any later release x.y'.z' with the same major version
3732
number, and your code will still build, be secure, and work.
3833

34+
Note that this guarantee only applies if you either use the default
35+
compile-time configuration (`mbedtls/mbedtls_config.h`) or the same modified
36+
compile-time configuration. Changing compile-time configuration options can
37+
result in an incompatible API or ABI, although features will generally not
38+
affect unrelated features (for example, enabling or disabling a
39+
cryptographic algorithm does not break code that does not use that
40+
algorithm).
41+
3942
Note that new releases of Mbed TLS may extend the API. Here are some
4043
examples of changes that are common in minor releases of Mbed TLS, and are
4144
not considered API compatibility breaks:
@@ -57,6 +60,25 @@ crypto that was found to be weak) may need to be changed. In case security
5760
comes in conflict with backwards compatibility, we will put security first,
5861
but always attempt to provide a compatibility option.
5962

63+
## Backward compatibility for the key store
64+
65+
We maintain backward compatibility with previous versions of the
66+
PSA Crypto persistent storage since Mbed TLS 2.25.0, provided that the
67+
storage backend (PSA ITS implementation) is configured in a compatible way.
68+
We intend to maintain this backward compatibility throughout a major version
69+
of Mbed TLS (for example, all Mbed TLS 3.y versions will be able to read
70+
keys written under any Mbed TLS 3.x with x <= y).
71+
72+
Mbed TLS 3.x can also read keys written by Mbed TLS 2.25.0 through 2.28.x
73+
LTS, but future major version upgrades (for example from 2.28.x/3.x to 4.y)
74+
may require the use of an upgrade tool.
75+
76+
Note that this guarantee does not currently fully extend to drivers, which
77+
are an experimental feature. We intend to maintain compatibility with the
78+
basic use of drivers from Mbed TLS 2.28.0 onwards, even if driver APIs
79+
change. However, for more experimental parts of the driver interface, such
80+
as the use of driver state, we do not yet guarantee backward compatibility.
81+
6082
## Long-time support branches
6183

6284
For the LTS branches, additionally we try very hard to also maintain ABI

CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ function(link_to_source base_name)
131131
set(target "${CMAKE_CURRENT_SOURCE_DIR}/${base_name}")
132132
endif()
133133

134-
if (NOT EXISTS ${link})
134+
# Linking to non-existent file is not desirable. At best you will have a
135+
# dangling link, but when building in tree, this can create a symbolic link
136+
# to itself.
137+
if (EXISTS ${target} AND NOT EXISTS ${link})
135138
if (CMAKE_HOST_UNIX)
136139
set(command ln -s ${target} ${link})
137140
else()
@@ -224,7 +227,7 @@ if(CMAKE_COMPILER_IS_CLANG)
224227
endif(CMAKE_COMPILER_IS_CLANG)
225228

226229
if(CMAKE_COMPILER_IS_IAR)
227-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts --warnings_are_errors -Ohz")
230+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts -Ohz")
228231
endif(CMAKE_COMPILER_IS_IAR)
229232

230233
if(CMAKE_COMPILER_IS_MSVC)
@@ -245,6 +248,10 @@ if(MBEDTLS_FATAL_WARNINGS)
245248
set(CMAKE_C_FLAGS_ASANDBG "${CMAKE_C_FLAGS_ASANDBG} -Wno-error=cpp")
246249
endif(UNSAFE_BUILD)
247250
endif(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNU)
251+
252+
if (CMAKE_COMPILER_IS_IAR)
253+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warning_are_errors")
254+
endif(CMAKE_COMPILER_IS_IAR)
248255
endif(MBEDTLS_FATAL_WARNINGS)
249256

250257
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
@@ -348,7 +355,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
348355
write_basic_package_version_file(
349356
"cmake/MbedTLSConfigVersion.cmake"
350357
COMPATIBILITY SameMajorVersion
351-
VERSION 3.1.0)
358+
VERSION 3.2.1)
352359

353360
install(
354361
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"

0 commit comments

Comments
 (0)