Base config compat check on MBETLS_VERSION_NUMBER
Any config with a version older than 3.0.0 or newer than MBETLS_VERSION_NUMBER will be rejected. This does mean that the current development version doesn'T accept *any* value of MBETLS_CONFIG_VERSION, but this will be fixed when we bump the version during our normal release process. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
fc04aa2be5
commit
1cafe5ce20
2 changed files with 6 additions and 9 deletions
|
@ -49,12 +49,6 @@
|
|||
#define MBEDTLS_VERSION_STRING "2.26.0"
|
||||
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.26.0"
|
||||
|
||||
/**
|
||||
* 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
|
||||
#endif
|
||||
|
@ -65,8 +59,9 @@
|
|||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CONFIG_VERSION) && \
|
||||
MBEDTLS_CONFIG_VERSION != MBEDTLS_CONFIG_VERSION_LATEST
|
||||
#if defined(MBEDTLS_CONFIG_VERSION) && ( \
|
||||
MBEDTLS_CONFIG_VERSION < 0x03000000 || \
|
||||
MBEDLTS_CONFIG_VERSION > MBEDTLS_VERSION_NUMBER )
|
||||
#error "Invalid config version, defined value of MBEDTLS_CONFIG_VERSION is unsupported"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,13 +25,15 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_CONFIG_VERSION
|
||||
*
|
||||
* 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
|
||||
//#define MBEDTLS_CONFIG_VERSION 0x03000000
|
||||
|
||||
/**
|
||||
* \name SECTION: System support
|
||||
|
|
Loading…
Reference in a new issue