From f48b1f810e9c94bd9a4ac4434c19b2c2bd89fa4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 14 Mar 2023 10:50:52 +0100 Subject: [PATCH] Rename internal function to something clearer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- library/md.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/md.c b/library/md.c index bffedb344..bebe3580b 100644 --- a/library/md.c +++ b/library/md.c @@ -201,7 +201,7 @@ static psa_algorithm_t psa_alg_of_md(const mbedtls_md_info_t *info) } } -static int md_uses_psa(const mbedtls_md_info_t *info) +static int md_can_use_psa(const mbedtls_md_info_t *info) { psa_algorithm_t alg = psa_alg_of_md(info); if (alg == PSA_ALG_NONE) { @@ -391,7 +391,7 @@ int mbedtls_md_setup(mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info #endif #if defined(MBEDTLS_MD_SOME_PSA) - if (md_uses_psa(ctx->md_info)) { + if (md_can_use_psa(ctx->md_info)) { ctx->md_ctx = mbedtls_calloc(1, sizeof(psa_hash_operation_t)); if (ctx->md_ctx == NULL) { return MBEDTLS_ERR_MD_ALLOC_FAILED; @@ -606,7 +606,7 @@ int mbedtls_md(const mbedtls_md_info_t *md_info, const unsigned char *input, siz } #if defined(MBEDTLS_MD_SOME_PSA) - if (md_uses_psa(md_info)) { + if (md_can_use_psa(md_info)) { size_t size = md_info->size; psa_status_t status = psa_hash_compute(psa_alg_of_md(md_info), input, ilen,