diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h index 0c3888987..57bbfeb6e 100644 --- a/include/mbedtls/error.h +++ b/include/mbedtls/error.h @@ -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 diff --git a/library/error.c b/library/error.c index eabee9e21..564490e58 100644 --- a/library/error.c +++ b/library/error.c @@ -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)