Merge pull request #9090 from valeriosetti/issue9068-backport

[Backport 3.6] Undefined reference to mbedtls_md_error_from_psa() function
This commit is contained in:
Manuel Pégourié-Gonnard 2024-05-03 07:52:41 +00:00 committed by GitHub
commit 67a92b7442
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,7 @@
#include "mbedtls/sha512.h" #include "mbedtls/sha512.h"
#include "mbedtls/sha3.h" #include "mbedtls/sha3.h"
#if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
#include <psa/crypto.h> #include <psa/crypto.h>
#include "md_psa.h" #include "md_psa.h"
#include "psa_util_internal.h" #include "psa_util_internal.h"
@ -761,13 +761,13 @@ mbedtls_md_type_t mbedtls_md_get_type(const mbedtls_md_info_t *md_info)
return md_info->type; return md_info->type;
} }
#if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
int mbedtls_md_error_from_psa(psa_status_t status) int mbedtls_md_error_from_psa(psa_status_t status)
{ {
return PSA_TO_MBEDTLS_ERR_LIST(status, psa_to_md_errors, return PSA_TO_MBEDTLS_ERR_LIST(status, psa_to_md_errors,
psa_generic_status_to_mbedtls); psa_generic_status_to_mbedtls);
} }
#endif /* MBEDTLS_PSA_CRYPTO_C */ #endif /* MBEDTLS_PSA_CRYPTO_CLIENT */
/************************************************************************ /************************************************************************