1 /** 2 * \file mbedtls/build_info.h 3 * 4 * \brief Build-time configuration info 5 * 6 * Include this file if you need to depend on the 7 * configuration options defined in mbedtls_config.h or MBEDTLS_CONFIG_FILE 8 */ 9 /* 10 * Copyright The Mbed TLS Contributors 11 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 12 */ 13 14 #ifndef MBEDTLS_BUILD_INFO_H 15 #define MBEDTLS_BUILD_INFO_H 16 17 #include "tf-psa-crypto/build_info.h" 18 19 /* 20 * This set of compile-time defines can be used to determine the version number 21 * of the Mbed TLS library used. Run-time variables for the same can be found in 22 * version.h 23 */ 24 25 /** 26 * The version number x.y.z is split into three parts. 27 * Major, Minor, Patchlevel 28 */ 29 #define MBEDTLS_VERSION_MAJOR 4 30 #define MBEDTLS_VERSION_MINOR 0 31 #define MBEDTLS_VERSION_PATCH 0 32 33 /** 34 * The single version number has the following structure: 35 * MMNNPP00 36 * Major version | Minor version | Patch version 37 */ 38 #define MBEDTLS_VERSION_NUMBER 0x04000000 39 #define MBEDTLS_VERSION_STRING "4.0.0" 40 #define MBEDTLS_VERSION_STRING_FULL "Mbed TLS 4.0.0" 41 42 #if defined(MBEDTLS_CONFIG_FILES_READ) 43 #error "Something went wrong: MBEDTLS_CONFIG_FILES_READ defined before reading the config files!" 44 #endif 45 #if defined(MBEDTLS_CONFIG_IS_FINALIZED) 46 #error "Something went wrong: MBEDTLS_CONFIG_IS_FINALIZED defined before reading the config files!" 47 #endif 48 49 /* X.509 and TLS configuration */ 50 #if !defined(MBEDTLS_CONFIG_FILE) 51 #include "mbedtls/mbedtls_config.h" 52 #else 53 #include MBEDTLS_CONFIG_FILE 54 #endif 55 56 #if defined(MBEDTLS_CONFIG_VERSION) && ( \ 57 MBEDTLS_CONFIG_VERSION < 0x03000000 || \ 58 MBEDTLS_CONFIG_VERSION > MBEDTLS_VERSION_NUMBER) 59 #error "Invalid config version, defined value of MBEDTLS_CONFIG_VERSION is unsupported" 60 #endif 61 62 /* Target and application specific configurations 63 * 64 * Allow user to override any previous default. 65 * 66 */ 67 #if defined(MBEDTLS_USER_CONFIG_FILE) 68 #include MBEDTLS_USER_CONFIG_FILE 69 #endif 70 71 /* Indicate that all configuration files have been read. 72 * It is now time to adjust the configuration (follow through on dependencies, 73 * make PSA and legacy crypto consistent, etc.). 74 */ 75 #define MBEDTLS_CONFIG_FILES_READ 76 77 #include "mbedtls/config_adjust_x509.h" 78 79 #include "mbedtls/config_adjust_ssl.h" 80 81 /* Indicate that all configuration symbols are set, 82 * even the ones that are calculated programmatically. 83 * It is now safe to query the configuration (to check it, to size buffers, 84 * etc.). 85 */ 86 #define MBEDTLS_CONFIG_IS_FINALIZED 87 88 #endif /* MBEDTLS_BUILD_INFO_H */ 89