mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-07 13:22:46 +00:00
Add AES feature unavailable error code
This commit is contained in:
parent
45d269555b
commit
fd48739461
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#define MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -0x0020 /**< Invalid key length. */
|
#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_INVALID_INPUT_LENGTH -0x0022 /**< Invalid data input length. */
|
||||||
|
#define MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE -0x006E /**< Feature not available, e.g. unsupported AES key size. */
|
||||||
|
|
||||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
!defined(inline) && !defined(__cplusplus)
|
!defined(inline) && !defined(__cplusplus)
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
* GCM 2 0x0012-0x0014
|
* GCM 2 0x0012-0x0014
|
||||||
* BLOWFISH 2 0x0016-0x0018
|
* BLOWFISH 2 0x0016-0x0018
|
||||||
* THREADING 3 0x001A-0x001E
|
* THREADING 3 0x001A-0x001E
|
||||||
* AES 2 0x0020-0x0022
|
* AES 2 0x0020-0x0022 0x006E-0x006E
|
||||||
* CAMELLIA 2 0x0024-0x0026
|
* CAMELLIA 2 0x0024-0x0026
|
||||||
* XTEA 1 0x0028-0x0028
|
* XTEA 1 0x0028-0x0028
|
||||||
* BASE64 2 0x002A-0x002C
|
* BASE64 2 0x002A-0x002C
|
||||||
|
@ -516,6 +516,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
|||||||
mbedtls_snprintf( buf, buflen, "AES - Invalid key length" );
|
mbedtls_snprintf( buf, buflen, "AES - Invalid key length" );
|
||||||
if( use_ret == -(MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH) )
|
if( use_ret == -(MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH) )
|
||||||
mbedtls_snprintf( buf, buflen, "AES - Invalid data input length" );
|
mbedtls_snprintf( buf, buflen, "AES - Invalid data input length" );
|
||||||
|
if( use_ret == -(MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE) )
|
||||||
|
mbedtls_snprintf( buf, buflen, "AES - Feature not available, e.g. unsupported AES key size" );
|
||||||
#endif /* MBEDTLS_AES_C */
|
#endif /* MBEDTLS_AES_C */
|
||||||
|
|
||||||
#if defined(MBEDTLS_ASN1_PARSE_C)
|
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user