1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Merge pull request #9125 from eleuzi01/replace-mbedtls-md-can-ripemd160

Replace MBEDTLS_MD_CAN_RIPEMD160 with PSA_WANT_ALG_RIPEMD160
This commit is contained in:
Ronald Cron
2024-07-04 08:38:40 +00:00
committed by GitHub
6 changed files with 48 additions and 48 deletions

View File

@ -76,7 +76,7 @@ static const mbedtls_md_info_t mbedtls_md5_info = {
};
#endif
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
static const mbedtls_md_info_t mbedtls_ripemd160_info = {
MD_INFO(MBEDTLS_MD_RIPEMD160, 20, 64)
};
@ -143,7 +143,7 @@ const mbedtls_md_info_t *mbedtls_md_info_from_type(mbedtls_md_type_t md_type)
case MBEDTLS_MD_MD5:
return &mbedtls_md5_info;
#endif
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
case MBEDTLS_MD_RIPEMD160:
return &mbedtls_ripemd160_info;
#endif
@ -800,7 +800,7 @@ static const int supported_digests[] = {
MBEDTLS_MD_SHA1,
#endif
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
MBEDTLS_MD_RIPEMD160,
#endif
@ -841,7 +841,7 @@ static const md_name_entry md_names[] = {
#if defined(MBEDTLS_MD_CAN_MD5)
{ "MD5", MBEDTLS_MD_MD5 },
#endif
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
{ "RIPEMD160", MBEDTLS_MD_RIPEMD160 },
#endif
#if defined(MBEDTLS_MD_CAN_SHA1)

View File

@ -755,7 +755,7 @@ static const oid_md_alg_t oid_md_alg[] =
MBEDTLS_MD_SHA512,
},
#endif
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
{
OID_DESCRIPTOR(MBEDTLS_OID_DIGEST_ALG_RIPEMD160, "id-ripemd160", "RIPEMD-160"),
MBEDTLS_MD_RIPEMD160,
@ -863,12 +863,12 @@ static const oid_md_hmac_t oid_md_hmac[] =
MBEDTLS_MD_SHA3_512,
},
#endif /* MBEDTLS_MD_CAN_SHA3_512 */
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
{
OID_DESCRIPTOR(MBEDTLS_OID_HMAC_RIPEMD160, "hmacRIPEMD160", "HMAC-RIPEMD160"),
MBEDTLS_MD_RIPEMD160,
},
#endif /* MBEDTLS_MD_CAN_RIPEMD160 */
#endif /* PSA_WANT_ALG_RIPEMD160 */
{
NULL_OID_DESCRIPTOR,
MBEDTLS_MD_NONE,

View File

@ -153,7 +153,7 @@ static inline const char *md_type_to_string(mbedtls_md_type_t md_alg)
case MBEDTLS_MD_SHA512:
return "SHA512";
#endif
#if defined(MBEDTLS_MD_CAN_RIPEMD160)
#if defined(PSA_WANT_ALG_RIPEMD160)
case MBEDTLS_MD_RIPEMD160:
return "RIPEMD160";
#endif