mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Make config version symbols optional
Also remove them from the example configs, but keep the one in mbedtls_config.h. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
		
							parent
							
								
									04982f7b6b
								
							
						
					
					
						commit
						b2e23de0f3
					
				| @ -30,8 +30,6 @@ | |||||||
|  * See README.txt for usage instructions. |  * See README.txt for usage instructions. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #define MBEDTLS_CONFIG_VERSION 1 |  | ||||||
| 
 |  | ||||||
| /* System support */ | /* System support */ | ||||||
| //#define MBEDTLS_HAVE_TIME /* Optionally used in Hello messages */
 | //#define MBEDTLS_HAVE_TIME /* Optionally used in Hello messages */
 | ||||||
| /* Other MBEDTLS_HAVE_XXX flags irrelevant for this configuration */ | /* Other MBEDTLS_HAVE_XXX flags irrelevant for this configuration */ | ||||||
|  | |||||||
| @ -29,8 +29,6 @@ | |||||||
|  * See README.txt for usage instructions. |  * See README.txt for usage instructions. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #define MBEDTLS_CONFIG_VERSION 1 |  | ||||||
| 
 |  | ||||||
| /* System support */ | /* System support */ | ||||||
| #define MBEDTLS_HAVE_ASM | #define MBEDTLS_HAVE_ASM | ||||||
| #define MBEDTLS_HAVE_TIME | #define MBEDTLS_HAVE_TIME | ||||||
|  | |||||||
| @ -33,8 +33,6 @@ | |||||||
|  * See README.txt for usage instructions. |  * See README.txt for usage instructions. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #define MBEDTLS_CONFIG_VERSION 1 |  | ||||||
| 
 |  | ||||||
| /* System support */ | /* System support */ | ||||||
| #define MBEDTLS_HAVE_ASM | #define MBEDTLS_HAVE_ASM | ||||||
| #define MBEDTLS_HAVE_TIME | #define MBEDTLS_HAVE_TIME | ||||||
|  | |||||||
| @ -20,8 +20,6 @@ | |||||||
|  *  limitations under the License. |  *  limitations under the License. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #define MBEDTLS_CONFIG_VERSION 1 |  | ||||||
| 
 |  | ||||||
| /* System support */ | /* System support */ | ||||||
| //#define MBEDTLS_HAVE_ASM
 | //#define MBEDTLS_HAVE_ASM
 | ||||||
| #define MBEDTLS_HAVE_TIME | #define MBEDTLS_HAVE_TIME | ||||||
|  | |||||||
| @ -32,8 +32,6 @@ | |||||||
|  * See README.txt for usage instructions. |  * See README.txt for usage instructions. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #define MBEDTLS_CONFIG_VERSION 1 |  | ||||||
| 
 |  | ||||||
| /* System support */ | /* System support */ | ||||||
| #define MBEDTLS_HAVE_ASM | #define MBEDTLS_HAVE_ASM | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -49,6 +49,8 @@ | |||||||
| #define MBEDTLS_VERSION_STRING         "2.26.0" | #define MBEDTLS_VERSION_STRING         "2.26.0" | ||||||
| #define MBEDTLS_VERSION_STRING_FULL    "mbed TLS 2.26.0" | #define MBEDTLS_VERSION_STRING_FULL    "mbed TLS 2.26.0" | ||||||
| 
 | 
 | ||||||
|  | #define MBEDTLS_CONFIG_VERSION_LATEST 1 | ||||||
|  | 
 | ||||||
| #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) | #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) | ||||||
| #define _CRT_SECURE_NO_DEPRECATE 1 | #define _CRT_SECURE_NO_DEPRECATE 1 | ||||||
| #endif | #endif | ||||||
| @ -59,9 +61,10 @@ | |||||||
| #include MBEDTLS_CONFIG_FILE | #include MBEDTLS_CONFIG_FILE | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if !defined(MBEDTLS_CONFIG_VERSION) || \ | #if !defined(MBEDTLS_CONFIG_VERSION) | ||||||
|     MBEDTLS_CONFIG_VERSION != 1 | #define MBEDTLS_CONFIG_VERSION MBEDTLS_CONFIG_VERSION_LATEST | ||||||
| #error "Invalid config version, MBEDTLS_CONFIG_VERSION != 1" | #elif MBEDTLS_CONFIG_VERSION != MBEDTLS_CONFIG_VERSION_LATEST | ||||||
|  | #error "Invalid config version, defined value of MBEDTLS_CONFIG_VERSION is unsupported" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(MBEDTLS_USER_CONFIG_VERSION) | #if defined(MBEDTLS_USER_CONFIG_VERSION) | ||||||
| @ -75,7 +78,7 @@ | |||||||
|  */ |  */ | ||||||
| #if defined(MBEDTLS_USER_CONFIG_FILE) | #if defined(MBEDTLS_USER_CONFIG_FILE) | ||||||
| #include MBEDTLS_USER_CONFIG_FILE | #include MBEDTLS_USER_CONFIG_FILE | ||||||
| #if !defined(MBEDTLS_USER_CONFIG_VERSION) || \ | #if defined(MBEDTLS_USER_CONFIG_VERSION) && \ | ||||||
|     MBEDTLS_USER_CONFIG_VERSION != MBEDTLS_CONFIG_VERSION |     MBEDTLS_USER_CONFIG_VERSION != MBEDTLS_CONFIG_VERSION | ||||||
| #error "Version mismatch between config file and MBEDTLS_USER_CONFIG_FILE" | #error "Version mismatch between config file and MBEDTLS_USER_CONFIG_FILE" | ||||||
| #endif | #endif | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bence Szépkúti
						Bence Szépkúti