From dbf5d2b1a729cbc70150149e0e4d5e31defd8412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Mon, 28 Jun 2021 10:34:29 +0100 Subject: [PATCH] Improve the instructions in the migration guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- docs/3.0-migration-guide.d/split_config.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/3.0-migration-guide.d/split_config.md b/docs/3.0-migration-guide.d/split_config.md index ced38967d9..989326122e 100644 --- a/docs/3.0-migration-guide.d/split_config.md +++ b/docs/3.0-migration-guide.d/split_config.md @@ -2,12 +2,15 @@ Introduce a level of indirection and versioning in the config files ------------------------------------------------------------------- `config.h` was split into `build_info.h` and `mbedtls_config.h`. -`build_info.h` is intended to be included from C code directly, while -`mbedtls_config.h` is intended to be edited by end users wishing to -change the build configuration, and should generally only be included from -`build_info.h`. This is because all the preprocessor logic has been moved -into `build_info.h`, including the handling of the `MBEDTLS_CONFIG_FILE` -macro. + +* In code, use `#include `. Don't include `mbedtls/config.h` and don't refer to `MBEDTLS_CONFIG_FILE`. +* In build tools, edit `mbedtls_config.h`, or edit `MBEDTLS_CONFIG_FILE` as before. +* 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. + +Also, if you have a custom configuration file: + +* Don't include `check_config.h` anymore. +* Don't define `MBEDTLS_CONFIG_H` anymore. A config file version symbol, `MBEDTLS_CONFIG_VERSION` was introduced. Defining it to a particular value will ensure that Mbed TLS interprets