Undo deprecation of MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH
diff --git a/ChangeLog b/ChangeLog
index 5a569a3..42e3f94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,10 +31,8 @@
mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret()
mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret()
* Extend ECDH interface to enable alternative implementations.
- * Deprecate the ARIA error constants
- - MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH
- - MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH
- in favour of a new single error MBEDTLS_ERR_ARIA_BAD_INPUT_DATA.
+ * Deprecate the ARIA error MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH
+ in favour of a new generic error MBEDTLS_ERR_ARIA_BAD_INPUT_DATA.
* Deprecate the CAMELLIA error MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH
in favour a new generic error MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA.
* Deprecate the Blowfish error constants
diff --git a/include/mbedtls/aria.h b/include/mbedtls/aria.h
index 6198750..9e981d9 100644
--- a/include/mbedtls/aria.h
+++ b/include/mbedtls/aria.h
@@ -50,10 +50,11 @@
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
#define MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x005C )
-#define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x005E )
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
#define MBEDTLS_ERR_ARIA_BAD_INPUT_DATA -0x005C /**< Bad input data. */
+#define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E /**< Invalid data input length. */
+
/* MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE is deprecated and should not be used.
*/
#define MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE -0x005A /**< Feature not available. For example, an unsupported ARIA key size. */
diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h
index c4883be..56042c9 100644
--- a/include/mbedtls/error.h
+++ b/include/mbedtls/error.h
@@ -63,7 +63,7 @@
* CTR_DBRG 4 0x0034-0x003A
* ENTROPY 3 0x003C-0x0040 0x003D-0x003F
* NET 13 0x0042-0x0052 0x0043-0x0049
- * ARIA 3 0x0058-0x005C
+ * ARIA 4 0x0058-0x005E
* ASN1 7 0x0060-0x006C
* CMAC 1 0x007A-0x007A
* PBKDF2 1 0x007C-0x007C
diff --git a/library/aria.c b/library/aria.c
index 9763ca6..6d87941 100644
--- a/library/aria.c
+++ b/library/aria.c
@@ -613,7 +613,7 @@
unsigned char temp[MBEDTLS_ARIA_BLOCKSIZE];
if( length % MBEDTLS_ARIA_BLOCKSIZE )
- return( MBEDTLS_ERR_ARIA_BAD_INPUT_DATA );
+ return( MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH );
if( mode == MBEDTLS_ARIA_DECRYPT )
{
diff --git a/library/error.c b/library/error.c
index 80f4948..a70db68 100644
--- a/library/error.c
+++ b/library/error.c
@@ -620,6 +620,8 @@
#if defined(MBEDTLS_ARIA_C)
if( use_ret == -(MBEDTLS_ERR_ARIA_BAD_INPUT_DATA) )
mbedtls_snprintf( buf, buflen, "ARIA - Bad input data" );
+ if( use_ret == -(MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH) )
+ mbedtls_snprintf( buf, buflen, "ARIA - Invalid data input length" );
if( use_ret == -(MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE) )
mbedtls_snprintf( buf, buflen, "ARIA - Feature not available. For example, an unsupported ARIA key size" );
if( use_ret == -(MBEDTLS_ERR_ARIA_HW_ACCEL_FAILED) )