From ab97e003f33a8ff74bcfc0e2d67ed2c47f9b6792 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Mon, 21 Jun 2021 10:56:29 +0100 Subject: [PATCH] Improve psa_rsa_decode_md_type() Remove a case that cannot be triggered as PSA_ALG_SIGN_GET_HASH always returns 0 for raw algorithms. Signed-off-by: Janos Follath --- library/psa_crypto_rsa.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/library/psa_crypto_rsa.c b/library/psa_crypto_rsa.c index 4363e913d..53889234b 100644 --- a/library/psa_crypto_rsa.c +++ b/library/psa_crypto_rsa.c @@ -368,11 +368,6 @@ static psa_status_t psa_rsa_decode_md_type( psa_algorithm_t alg, if( mbedtls_md_get_size( md_info ) != hash_length ) return( PSA_ERROR_INVALID_ARGUMENT ); } - else - { - if( hash_alg != 0 ) - return( PSA_ERROR_INVALID_ARGUMENT ); - } return( PSA_SUCCESS ); }