mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-10 05:03:02 +03:00
Formally deprecate mbedtls_psa_translate_md()
The previous informal comment was not enough to prevent it from being used in several places in the library. This should have more effect, considering with have builds with DEPRECATED_REMOVED. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
#include "mbedtls/build_info.h"
|
#include "mbedtls/build_info.h"
|
||||||
|
|
||||||
|
#include "mbedtls/platform_util.h"
|
||||||
|
|
||||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||||
|
|
||||||
#include "psa/crypto.h"
|
#include "psa/crypto.h"
|
||||||
@@ -125,7 +127,8 @@ static inline psa_key_usage_t mbedtls_psa_translate_cipher_operation(
|
|||||||
/* Note: this function should not be used from inside the library, use
|
/* Note: this function should not be used from inside the library, use
|
||||||
* mbedtls_md_psa_alg_from_type() from the internal md_psa.h instead.
|
* mbedtls_md_psa_alg_from_type() from the internal md_psa.h instead.
|
||||||
* It is kept only for compatibility in case applications were using it. */
|
* It is kept only for compatibility in case applications were using it. */
|
||||||
static inline psa_algorithm_t mbedtls_psa_translate_md(mbedtls_md_type_t md_alg)
|
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||||
|
static inline MBEDTLS_DEPRECATED psa_algorithm_t mbedtls_psa_translate_md(mbedtls_md_type_t md_alg)
|
||||||
{
|
{
|
||||||
switch (md_alg) {
|
switch (md_alg) {
|
||||||
#if defined(MBEDTLS_MD5_C) || defined(PSA_WANT_ALG_MD5)
|
#if defined(MBEDTLS_MD5_C) || defined(PSA_WANT_ALG_MD5)
|
||||||
@@ -162,6 +165,7 @@ static inline psa_algorithm_t mbedtls_psa_translate_md(mbedtls_md_type_t md_alg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* MBEDTLS_DEPRECATED_REMOVED */
|
||||||
|
|
||||||
/* Translations for ECC. */
|
/* Translations for ECC. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user