mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #9123 from eleuzi01/replace-mbedtls-md-can-md5
Replace MBEDTLS_MD_CAN_MD5 with PSA_WANT_ALG_MD5
This commit is contained in:
@ -1331,7 +1331,7 @@ static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] =
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
|
||||
#if defined(MBEDTLS_MD_CAN_MD5)
|
||||
#if defined(PSA_WANT_ALG_MD5)
|
||||
{ MBEDTLS_TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5",
|
||||
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
|
||||
MBEDTLS_CIPHERSUITE_WEAK,
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "psa_util_internal.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MD_CAN_MD5)
|
||||
#if defined(PSA_WANT_ALG_MD5)
|
||||
#include "mbedtls/md5.h"
|
||||
#endif
|
||||
|
||||
@ -2517,7 +2517,7 @@ static inline int mbedtls_ssl_tls12_sig_alg_is_supported(
|
||||
unsigned char sig = MBEDTLS_BYTE_0(sig_alg);
|
||||
|
||||
switch (hash) {
|
||||
#if defined(MBEDTLS_MD_CAN_MD5)
|
||||
#if defined(PSA_WANT_ALG_MD5)
|
||||
case MBEDTLS_SSL_HASH_MD5:
|
||||
break;
|
||||
#endif
|
||||
|
@ -6132,7 +6132,7 @@ mbedtls_pk_type_t mbedtls_ssl_pk_alg_from_sig(unsigned char sig)
|
||||
mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash(unsigned char hash)
|
||||
{
|
||||
switch (hash) {
|
||||
#if defined(MBEDTLS_MD_CAN_MD5)
|
||||
#if defined(PSA_WANT_ALG_MD5)
|
||||
case MBEDTLS_SSL_HASH_MD5:
|
||||
return MBEDTLS_MD_MD5;
|
||||
#endif
|
||||
@ -6167,7 +6167,7 @@ mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash(unsigned char hash)
|
||||
unsigned char mbedtls_ssl_hash_from_md_alg(int md)
|
||||
{
|
||||
switch (md) {
|
||||
#if defined(MBEDTLS_MD_CAN_MD5)
|
||||
#if defined(PSA_WANT_ALG_MD5)
|
||||
case MBEDTLS_MD_MD5:
|
||||
return MBEDTLS_SSL_HASH_MD5;
|
||||
#endif
|
||||
|
@ -129,7 +129,7 @@ int mbedtls_x509_get_alg(unsigned char **p, const unsigned char *end,
|
||||
static inline const char *md_type_to_string(mbedtls_md_type_t md_alg)
|
||||
{
|
||||
switch (md_alg) {
|
||||
#if defined(MBEDTLS_MD_CAN_MD5)
|
||||
#if defined(PSA_WANT_ALG_MD5)
|
||||
case MBEDTLS_MD_MD5:
|
||||
return "MD5";
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user