blob: a63f070341514ac4865bd79df576116d21cf8e80 [file] [log] [blame] [view]
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +01001# Maintained branches
2
3At any point in time, we have a number of maintained branches consisting of:
4
Gilles Peskine991bbe72021-03-16 12:05:16 +01005- The [`master`](https://github.com/ARMmbed/mbedtls/tree/master) branch:
6 this always contains the latest release, including all publicly available
7 security fixes.
Gilles Peskinea23df132021-03-16 12:04:44 +01008- The [`development`](https://github.com/ARMmbed/mbedtls/tree/development) branch:
Dave Rodgman1bc9e932021-07-01 09:20:13 +01009 this is where the current major version of Mbed TLS (version 3.x) is being
Dave Rodgmana00e8502021-04-23 16:43:13 +010010 prepared. It has API changes that make it incompatible with Mbed TLS 2.x,
11 as well as all the new features and bug fixes and security fixes.
12- The [`development_2.x`](https://github.com/ARMmbed/mbedtls/tree/development_2.x) branch:
13 this branch retains the API of Mbed TLS 2.x, and has a subset of the
14 features added after Mbed TLS 2.26.0 and bug fixes and security fixes.
Gilles Peskinea23df132021-03-16 12:04:44 +010015- One or more long-time support (LTS) branches:
16 these only get bug fixes and security fixes.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010017
18We use [Semantic Versioning](https://semver.org/). In particular, we maintain
Gilles Peskine73876cf2021-06-08 15:33:53 +020019API compatibility in the `master` branch across minor version changes (e.g.
20the API of 3.(x+1) is backward compatible with 3.x). We only break API
21compatibility on major version changes (e.g. from 3.x to 4.0). We also maintain
22ABI compatibility within LTS branches; see the next section for details.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010023
24## Backwards Compatibility
25
Gilles Peskinea23df132021-03-16 12:04:44 +010026We maintain API compatibility in released versions of Mbed TLS. If you have
27code that's working and secure with Mbed TLS x.y.z and does not rely on
28undocumented features, then you should be able to re-compile it without
29modification with any later release x.y'.z' with the same major version
30number, and your code will still build, be secure, and work.
31
Gilles Peskine6dd92c32021-06-07 20:44:47 +020032Note that new releases of Mbed TLS may extend the API. Here are some
33examples of changes that are common in minor releases of Mbed TLS, and are
34not considered API compatibility breaks:
Gilles Peskine1483fe42021-06-01 22:29:06 +020035
36* Adding or reordering fields in a structure or union.
37* Removing a field from a structure, unless the field is documented as public.
38* Adding items to an enum.
Gilles Peskine6dd92c32021-06-07 20:44:47 +020039* Returning an error code that was not previously documented for a function
40 when a new error condition arises.
41* Changing which error code is returned in a case where multiple error
42 conditions apply.
43* Changing the behavior of a function from failing to succeeding, when the
44 change is a reasonable extension of the current behavior, i.e. the
45 addition of a new feature.
Gilles Peskine1483fe42021-06-01 22:29:06 +020046
Gilles Peskined1a8cd52021-06-07 20:42:40 +020047There are rare exceptions where we break API compatibility: code that was
48relying on something that became insecure in the meantime (for example,
49crypto that was found to be weak) may need to be changed. In case security
50comes in conflict with backwards compatibility, we will put security first,
51but always attempt to provide a compatibility option.
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010052
Gilles Peskine87d36e32021-06-07 20:42:50 +020053## Long-time support branches
54
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010055For the LTS branches, additionally we try very hard to also maintain ABI
56compatibility (same definition as API except with re-linking instead of
57re-compiling) and to avoid any increase in code size or RAM usage, or in the
58minimum version of tools needed to build the code. The only exception, as
59before, is in case those goals would conflict with fixing a security issue, we
60will put security first but provide a compatibility option. (So far we never
61had to break ABI compatibility in an LTS branch, but we occasionally had to
62increase code size for a security fix.)
63
Manuel Pégourié-Gonnard80c02af2021-02-25 12:34:58 +010064For contributors, see the [Backwards Compatibility section of
65CONTRIBUTING](CONTRIBUTING.md#cackwords-compatibility).
66
67## Current Branches
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010068
69The following branches are currently maintained:
70
Gilles Peskine991bbe72021-03-16 12:05:16 +010071- [master](https://github.com/ARMmbed/mbedtls/tree/master)
Gilles Peskinea23df132021-03-16 12:04:44 +010072- [`development`](https://github.com/ARMmbed/mbedtls/)
Dave Rodgmana00e8502021-04-23 16:43:13 +010073- [`development_2.x`](https://github.com/ARMmbed/mbedtls/tree/development_2.x)
Gilles Peskinea23df132021-03-16 12:04:44 +010074- [`mbedtls-2.16`](https://github.com/ARMmbed/mbedtls/tree/mbedtls-2.16)
Manuel Pégourié-Gonnard80c02af2021-02-25 12:34:58 +010075 maintained until at least the end of 2021, see
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010076 <https://tls.mbed.org/tech-updates/blog/announcing-lts-branch-mbedtls-2.16>
Manuel Pégourié-Gonnarde6997392021-02-25 11:40:08 +010077
78Users are urged to always use the latest version of a maintained branch.