From 863d48396531855bbd0bd4544b8655976ac2f7ea Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Sun, 9 Dec 2018 20:58:52 +0000 Subject: [PATCH] Add MBEDTLS_ERR_SHA512_BAD_INPUT_DATA to error.{h,c} --- library/error.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/error.c b/library/error.c index eabee9e21..3251af06c 100644 --- a/library/error.c +++ b/library/error.c @@ -865,6 +865,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen ) #if defined(MBEDTLS_SHA512_C) if( use_ret == -(MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED) ) mbedtls_snprintf( buf, buflen, "SHA512 - SHA-512 hardware accelerator failed" ); + if( use_ret == -(MBEDTLS_ERR_SHA512_BAD_INPUT_DATA) ) + mbedtls_snprintf( buf, buflen, "SHA512 - Invalid input data" ); #endif /* MBEDTLS_SHA512_C */ #if defined(MBEDTLS_THREADING_C)