Add parameter validation to SHA-512 module
diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h
index 0c38889..851be1b 100644
--- a/include/mbedtls/error.h
+++ b/include/mbedtls/error.h
@@ -76,7 +76,7 @@
* RIPEMD160 1 0x0031-0x0031
* SHA1 1 0x0035-0x0035
* SHA256 1 0x0037-0x0037
- * SHA512 1 0x0039-0x0039
+ * SHA512 1 0x0039-0x0039 0x0075-0x0075
* CHACHA20 3 0x0051-0x0055
* POLY1305 3 0x0057-0x005B
* CHACHAPOLY 2 0x0054-0x0056
diff --git a/include/mbedtls/sha512.h b/include/mbedtls/sha512.h
index 020f95d..257e8d4 100644
--- a/include/mbedtls/sha512.h
+++ b/include/mbedtls/sha512.h
@@ -37,6 +37,7 @@
/* MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED -0x0039 /**< SHA-512 hardware accelerator failed */
+#define MBEDTLS_ERR_SHA512_BAD_INPUT_DATA -0x0075 /**< Invalid input data. */
#ifdef __cplusplus
extern "C" {