cancel
Showing results for 
Search instead for 
Did you mean: 

ST patches for MbedTLS 3.6.5

Moemen
Associate II

Hello! 

Quick question about ST patches for MbedTLS 3.6.5 (stm32-mw-mbedtls).

Why was the defined(MBEDTLS_MD_SOME_PSA) added here (in library/md.c)?

When MBEDTLS_PSA_CRYPTO_C is defined, the only way to define MBEDTLS_MD_SOME_PSA is to define one of MBEDTLS_PSA_ACCEL_ALG_XXX which, I think, is an internal macro of MbedTLS. Should I just remove the patch or does it serve a purpose? Would it be better to define MBEDTLS_PSA_ACCEL_ALG_XXX?

#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(MBEDTLS_MD_SOME_PSA)
int mbedtls_md_error_from_psa(psa_status_t status)
{
    return PSA_TO_MBEDTLS_ERR_LIST(status, psa_to_md_errors,
                                   psa_generic_status_to_mbedtls);
}
#endif /* MBEDTLS_PSA_CRYPTO_CLIENT and MBEDTLS_MD_SOME_PSA */

Thank you in advance. 

0 REPLIES 0