From 2bb7456334bc72d4f4eb9cf29da8b989b76c1544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Mon, 21 Jun 2021 16:19:00 +0200 Subject: [PATCH] Base the config version on MBEDTLS_VERSION_NUMBER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- include/mbedtls/build_info.h | 6 +++++- include/mbedtls/mbedtls_config.h | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/build_info.h b/include/mbedtls/build_info.h index 6ccbc00953..1bb133dc7d 100644 --- a/include/mbedtls/build_info.h +++ b/include/mbedtls/build_info.h @@ -49,7 +49,11 @@ #define MBEDTLS_VERSION_STRING "2.26.0" #define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.26.0" -#define MBEDTLS_CONFIG_VERSION_LATEST 1 +/** + * Equal to the #MBEDTLS_VERSION_NUMBER of the mbedtls version that introduced + * the most recent config version + */ +#define MBEDTLS_CONFIG_VERSION_LATEST 0x03000000 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) #define _CRT_SECURE_NO_DEPRECATE 1 diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index af2c438e1d..8aa88b0d60 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -24,7 +24,14 @@ * limitations under the License. */ -#define MBEDTLS_CONFIG_VERSION 1 +/** + * This is an optional version symbol that enables comatibility handling of + * config files. + * + * It is equal to the #MBEDTLS_VERSION_NUMBER of the mbedtls version that + * introduced the config format we want to be compatible with. + */ +#define MBEDTLS_CONFIG_VERSION 0x03000000 /** * \name SECTION: System support