From cab876aa5d6088a83fade00fbd6e1f435a08fc13 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Tue, 2 Jul 2024 11:32:06 +0100 Subject: [PATCH] Zephyr: Support Mbed TLS 3.6.0 --- zephyr/config-mbedtls-libcoap.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/zephyr/config-mbedtls-libcoap.h b/zephyr/config-mbedtls-libcoap.h index 1d2ccbeaff..f74d236087 100644 --- a/zephyr/config-mbedtls-libcoap.h +++ b/zephyr/config-mbedtls-libcoap.h @@ -53,4 +53,34 @@ #endif /* ! MBEDTLS_CAN_ECDH */ #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ +#if defined(MBEDTLS_ENTROPY_C) +#ifndef MBEDTLS_MD_CAN_SHA256 +#define MBEDTLS_MD_CAN_SHA256 +#endif /* ! MBEDTLS_MD_CAN_SHA256 */ +#endif /* MBEDTLS_ENTROPY_C */ + +#if defined(MBEDTLS_CCM_C) +#ifndef MBEDTLS_CCM_GCM_CAN_AES +#define MBEDTLS_CCM_GCM_CAN_AES +#endif /* ! MBEDTLS_MD_CAN_SHA256 */ +#endif /* MBEDTLS_CCM_C */ + +#if defined(MBEDTLS_GCM_C) +#ifndef MBEDTLS_CCM_GCM_CAN_AES +#define MBEDTLS_CCM_GCM_CAN_AES +#endif /* ! MBEDTLS_CCM_GCM_CAN_AES */ +#endif /* MBEDTLS_GCM_C */ + +#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) +#ifndef PSA_WANT_ECC_SECP_R1_256 +#define PSA_WANT_ECC_SECP_R1_256 +#endif /* ! PSA_WANT_ECC_SECP_R1_256 */ +#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ + +#if defined(MBEDTLS_MD_C) +#ifndef MBEDTLS_MD_CAN_SHA256 +#define MBEDTLS_MD_CAN_SHA256 +#endif /* ! MBEDTLS_MD_CAN_SHA256 */ +#endif /* MBEDTLS_MD_C */ + #endif /* CONFIG_MBEDTLS_LIBCOAP_H */