Bence Szépkúti | 90b79ab | 2021-06-04 00:19:53 +0200 | [diff] [blame] | 1 | Introduce a level of indirection and versioning in the config files |
| 2 | ------------------------------------------------------------------- |
| 3 | |
| 4 | `config.h` was split into `build_info.h` and `mbedtls_config.h`. |
Bence Szépkúti | dbf5d2b | 2021-06-28 10:34:29 +0100 | [diff] [blame^] | 5 | |
| 6 | * In code, use `#include <mbedtls/build_info.h>`. Don't include `mbedtls/config.h` and don't refer to `MBEDTLS_CONFIG_FILE`. |
| 7 | * In build tools, edit `mbedtls_config.h`, or edit `MBEDTLS_CONFIG_FILE` as before. |
| 8 | * If you had a tool that parsed the library version from `include/mbedtls/version.h`, this has moved to `include/mbedtls/build_info.h`. From C code, both headers now define the `MBEDTLS_VERSION_xxx` macros. |
| 9 | |
| 10 | Also, if you have a custom configuration file: |
| 11 | |
| 12 | * Don't include `check_config.h` anymore. |
| 13 | * Don't define `MBEDTLS_CONFIG_H` anymore. |
Bence Szépkúti | 90b79ab | 2021-06-04 00:19:53 +0200 | [diff] [blame] | 14 | |
Bence Szépkúti | 60c8634 | 2021-06-22 10:03:02 +0200 | [diff] [blame] | 15 | A config file version symbol, `MBEDTLS_CONFIG_VERSION` was introduced. |
Bence Szépkúti | 1b2a883 | 2021-06-28 10:26:11 +0100 | [diff] [blame] | 16 | Defining it to a particular value will ensure that Mbed TLS interprets |
Bence Szépkúti | 36da4cc | 2021-06-21 17:14:41 +0200 | [diff] [blame] | 17 | the config file in a way that's compatible with the config file format |
Bence Szépkúti | 1b2a883 | 2021-06-28 10:26:11 +0100 | [diff] [blame] | 18 | used by the Mbed TLS release whose `MBEDTLS_VERSION_NUMBER` has the same |
Bence Szépkúti | 60c8634 | 2021-06-22 10:03:02 +0200 | [diff] [blame] | 19 | value. |
Bence Szépkúti | 1b2a883 | 2021-06-28 10:26:11 +0100 | [diff] [blame] | 20 | The only value supported by Mbed TLS 3.0.0 is `0x03000000`. |