Add MBEDTLS_ERR_SHA1_BAD_INPUT_DATA to error.{h,c}

This commit is contained in:
Andres Amaya Garcia 2018-12-09 19:13:01 +00:00 committed by Hanno Becker
parent f7c43b3145
commit a685d4f28d
2 changed files with 3 additions and 1 deletions

View file

@ -74,7 +74,7 @@
* MD4 1 0x002D-0x002D
* MD5 1 0x002F-0x002F
* RIPEMD160 1 0x0031-0x0031
* SHA1 1 0x0035-0x0035
* SHA1 1 0x0035-0x0035 0x0073-0x0073
* SHA256 1 0x0037-0x0037
* SHA512 1 0x0039-0x0039
* CHACHA20 3 0x0051-0x0055

View file

@ -855,6 +855,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
#if defined(MBEDTLS_SHA1_C)
if( use_ret == -(MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED) )
mbedtls_snprintf( buf, buflen, "SHA1 - SHA-1 hardware accelerator failed" );
if( use_ret == -(MBEDTLS_ERR_SHA1_BAD_INPUT_DATA) )
mbedtls_snprintf( buf, buflen, "SHA1 - Invalid input data" );
#endif /* MBEDTLS_SHA1_C */
#if defined(MBEDTLS_SHA256_C)