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:
parent
36fb12e7dd
commit
2d6d993662
24 changed files with 50 additions and 113 deletions
library
|
@ -2064,7 +2064,7 @@ static int x509_crt_verifycrl(mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
|
|||
}
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
psa_algorithm = mbedtls_hash_info_psa_from_md(crl_list->sig_md);
|
||||
psa_algorithm = mbedtls_md_psa_alg_from_type(crl_list->sig_md);
|
||||
if (psa_hash_compute(psa_algorithm,
|
||||
crl_list->tbs.p,
|
||||
crl_list->tbs.len,
|
||||
|
@ -2144,7 +2144,7 @@ static int x509_crt_check_signature(const mbedtls_x509_crt *child,
|
|||
return -1;
|
||||
}
|
||||
#else
|
||||
psa_algorithm_t hash_alg = mbedtls_hash_info_psa_from_md(child->sig_md);
|
||||
psa_algorithm_t hash_alg = mbedtls_md_psa_alg_from_type(child->sig_md);
|
||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||
|
||||
status = psa_hash_compute(hash_alg,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue