From f17f85ef0cb87d37d97b5ac4d32e3dbbe7b373df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 15 Sep 2022 11:49:04 +0200 Subject: [PATCH] Simplify definition of TLS 1.3 MD max size. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Actually this macro is never used in parts that depend on USE_PSA, so it's always using PSA. Currently the macro seems a bit redundant, but: - since it's public we can't remove it; - and there are plans in the future to make it more precise (actually the largest hash that matters for TLS 1.3 is SHA-384 now). Signed-off-by: Manuel Pégourié-Gonnard --- include/mbedtls/ssl.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 1e0220a6a..3811fd224 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -629,11 +629,7 @@ union mbedtls_ssl_premaster_secret #define MBEDTLS_PREMASTER_SIZE sizeof( union mbedtls_ssl_premaster_secret ) -#if defined(MBEDTLS_USE_PSA_CRYPTO) #define MBEDTLS_TLS1_3_MD_MAX_SIZE PSA_HASH_MAX_SIZE -#else -#define MBEDTLS_TLS1_3_MD_MAX_SIZE MBEDTLS_MD_MAX_SIZE -#endif /* MBEDTLS_USE_PSA_CRYPTO */ /* Length in number of bytes of the TLS sequence number */