Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 1 | # Maintained branches |
| 2 | |
| 3 | At any point in time, we have a number of maintained branches consisting of: |
| 4 | |
Gilles Peskine | 991bbe7 | 2021-03-16 12:05:16 +0100 | [diff] [blame] | 5 | - 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 Peskine | a23df13 | 2021-03-16 12:04:44 +0100 | [diff] [blame] | 8 | - The [`development`](https://github.com/ARMmbed/mbedtls/tree/development) branch: |
Dave Rodgman | a00e850 | 2021-04-23 16:43:13 +0100 | [diff] [blame] | 9 | this is where the next major version of Mbed TLS (version 3.0) is being |
| 10 | 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 Peskine | a23df13 | 2021-03-16 12:04:44 +0100 | [diff] [blame] | 15 | - One or more long-time support (LTS) branches: |
| 16 | these only get bug fixes and security fixes. |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 17 | |
| 18 | We use [Semantic Versioning](https://semver.org/). In particular, we maintain |
Gilles Peskine | 991bbe7 | 2021-03-16 12:05:16 +0100 | [diff] [blame] | 19 | API compatibility in the `master` branch between major version changes. We |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 20 | also maintain ABI compatibility within LTS branches; see the next section for |
| 21 | details. |
| 22 | |
| 23 | ## Backwards Compatibility |
| 24 | |
Gilles Peskine | a23df13 | 2021-03-16 12:04:44 +0100 | [diff] [blame] | 25 | We maintain API compatibility in released versions of Mbed TLS. If you have |
| 26 | code that's working and secure with Mbed TLS x.y.z and does not rely on |
| 27 | undocumented features, then you should be able to re-compile it without |
| 28 | modification with any later release x.y'.z' with the same major version |
| 29 | number, and your code will still build, be secure, and work. |
| 30 | |
Gilles Peskine | 6dd92c3 | 2021-06-07 20:44:47 +0200 | [diff] [blame^] | 31 | Note that new releases of Mbed TLS may extend the API. Here are some |
| 32 | examples of changes that are common in minor releases of Mbed TLS, and are |
| 33 | not considered API compatibility breaks: |
Gilles Peskine | 1483fe4 | 2021-06-01 22:29:06 +0200 | [diff] [blame] | 34 | |
| 35 | * Adding or reordering fields in a structure or union. |
| 36 | * Removing a field from a structure, unless the field is documented as public. |
| 37 | * Adding items to an enum. |
Gilles Peskine | 6dd92c3 | 2021-06-07 20:44:47 +0200 | [diff] [blame^] | 38 | * Returning an error code that was not previously documented for a function |
| 39 | when a new error condition arises. |
| 40 | * Changing which error code is returned in a case where multiple error |
| 41 | conditions apply. |
| 42 | * Changing the behavior of a function from failing to succeeding, when the |
| 43 | change is a reasonable extension of the current behavior, i.e. the |
| 44 | addition of a new feature. |
Gilles Peskine | 1483fe4 | 2021-06-01 22:29:06 +0200 | [diff] [blame] | 45 | |
Gilles Peskine | d1a8cd5 | 2021-06-07 20:42:40 +0200 | [diff] [blame] | 46 | There are rare exceptions where we break API compatibility: code that was |
| 47 | relying on something that became insecure in the meantime (for example, |
| 48 | crypto that was found to be weak) may need to be changed. In case security |
| 49 | comes in conflict with backwards compatibility, we will put security first, |
| 50 | but always attempt to provide a compatibility option. |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 51 | |
Gilles Peskine | 87d36e3 | 2021-06-07 20:42:50 +0200 | [diff] [blame] | 52 | ## Long-time support branches |
| 53 | |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 54 | For the LTS branches, additionally we try very hard to also maintain ABI |
| 55 | compatibility (same definition as API except with re-linking instead of |
| 56 | re-compiling) and to avoid any increase in code size or RAM usage, or in the |
| 57 | minimum version of tools needed to build the code. The only exception, as |
| 58 | before, is in case those goals would conflict with fixing a security issue, we |
| 59 | will put security first but provide a compatibility option. (So far we never |
| 60 | had to break ABI compatibility in an LTS branch, but we occasionally had to |
| 61 | increase code size for a security fix.) |
| 62 | |
Manuel Pégourié-Gonnard | 80c02af | 2021-02-25 12:34:58 +0100 | [diff] [blame] | 63 | For contributors, see the [Backwards Compatibility section of |
| 64 | CONTRIBUTING](CONTRIBUTING.md#cackwords-compatibility). |
| 65 | |
| 66 | ## Current Branches |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 67 | |
| 68 | The following branches are currently maintained: |
| 69 | |
Gilles Peskine | 991bbe7 | 2021-03-16 12:05:16 +0100 | [diff] [blame] | 70 | - [master](https://github.com/ARMmbed/mbedtls/tree/master) |
Gilles Peskine | a23df13 | 2021-03-16 12:04:44 +0100 | [diff] [blame] | 71 | - [`development`](https://github.com/ARMmbed/mbedtls/) |
Dave Rodgman | a00e850 | 2021-04-23 16:43:13 +0100 | [diff] [blame] | 72 | - [`development_2.x`](https://github.com/ARMmbed/mbedtls/tree/development_2.x) |
Gilles Peskine | a23df13 | 2021-03-16 12:04:44 +0100 | [diff] [blame] | 73 | - [`mbedtls-2.16`](https://github.com/ARMmbed/mbedtls/tree/mbedtls-2.16) |
Manuel Pégourié-Gonnard | 80c02af | 2021-02-25 12:34:58 +0100 | [diff] [blame] | 74 | maintained until at least the end of 2021, see |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 75 | <https://tls.mbed.org/tech-updates/blog/announcing-lts-branch-mbedtls-2.16> |
Manuel Pégourié-Gonnard | e699739 | 2021-02-25 11:40:08 +0100 | [diff] [blame] | 76 | |
| 77 | Users are urged to always use the latest version of a maintained branch. |