mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Use more suitable function for checking if hash is supported
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
@ -515,7 +515,7 @@ int mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding,
|
|||||||
( hash_id != MBEDTLS_MD_NONE ) )
|
( hash_id != MBEDTLS_MD_NONE ) )
|
||||||
{
|
{
|
||||||
/* Just make sure this hash is supported in this build. */
|
/* Just make sure this hash is supported in this build. */
|
||||||
if( mbedtls_hash_info_get_size( hash_id ) == 0 )
|
if( mbedtls_hash_info_psa_from_md( hash_id ) == PSA_ALG_NONE )
|
||||||
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
|
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PKCS1_V21 */
|
#endif /* MBEDTLS_PKCS1_V21 */
|
||||||
|
Reference in New Issue
Block a user