From c5380649d94e69764e261548087e365262cf4e2e Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Tue, 28 Nov 2017 19:57:51 +0000 Subject: [PATCH] Change value of MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE Change the value of the error MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE to 0x0023 to ensure the errors in the AES module are all in a continuous range. --- include/mbedtls/aes.h | 5 ++++- include/mbedtls/error.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/aes.h b/include/mbedtls/aes.h index 660ec2add..f1c3d3a8c 100644 --- a/include/mbedtls/aes.h +++ b/include/mbedtls/aes.h @@ -36,9 +36,12 @@ #define MBEDTLS_AES_ENCRYPT 1 #define MBEDTLS_AES_DECRYPT 0 +/* Error codes in range 0x0020-0x0022 */ #define MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -0x0020 /**< Invalid key length. */ #define MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH -0x0022 /**< Invalid data input length. */ -#define MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE -0x006E /**< Feature not available, e.g. unsupported AES key size. */ + +/* Error codes in range 0x0023-0x0023 */ +#define MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE -0x0023 /**< Feature not available, e.g. unsupported AES key size. */ #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ !defined(inline) && !defined(__cplusplus) diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h index 8dfeb6221..5fffb0d22 100644 --- a/include/mbedtls/error.h +++ b/include/mbedtls/error.h @@ -52,7 +52,7 @@ * GCM 2 0x0012-0x0014 * BLOWFISH 2 0x0016-0x0018 * THREADING 3 0x001A-0x001E - * AES 2 0x0020-0x0022 0x006E-0x006E + * AES 2 0x0020-0x0022 0x0023-0x0023 * CAMELLIA 2 0x0024-0x0026 * XTEA 1 0x0028-0x0028 * BASE64 2 0x002A-0x002C