move hash update zero-length-input check back into the core
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 9c645ef..c5f9601 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -2226,6 +2226,11 @@
if( operation->id == 0 )
return( PSA_ERROR_BAD_STATE );
+ /* Don't require hash implementations to behave correctly on a
+ * zero-length input, which may have an invalid pointer. */
+ if( input_length == 0 )
+ return( PSA_SUCCESS );
+
psa_status_t status = psa_driver_wrapper_hash_update( operation,
input, input_length );
if( status != PSA_SUCCESS )