mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-02 21:06:37 +03:00
Use MD<->PSA functions from MD light
As usual, just a search-and-replace plus: 1. Removing things from hash_info.[ch] 2. Adding new auto-enable MD_LIGHT in build-info.h 3. Including md_psa.h where needed Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@ -47,6 +47,7 @@
|
||||
#include "constant_time_internal.h"
|
||||
#include "mbedtls/constant_time.h"
|
||||
#include "hash_info.h"
|
||||
#include "md_psa.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -478,7 +479,7 @@ int mbedtls_rsa_set_padding(mbedtls_rsa_context *ctx, int padding,
|
||||
if ((padding == MBEDTLS_RSA_PKCS_V21) &&
|
||||
(hash_id != MBEDTLS_MD_NONE)) {
|
||||
/* Just make sure this hash is supported in this build. */
|
||||
if (mbedtls_hash_info_psa_from_md(hash_id) == PSA_ALG_NONE) {
|
||||
if (mbedtls_md_psa_alg_from_type(hash_id) == PSA_ALG_NONE) {
|
||||
return MBEDTLS_ERR_RSA_INVALID_PADDING;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user