From 7f2c3e40349efdd825681af1597a21ed092c9ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 2 Sep 2019 15:07:20 +0200 Subject: [PATCH] Remove dependency of ssl_cookie on SHA-224 Cookies are fully opaque so we can change the hash used at any time, it's not part of the API. The cookie module handles truncation, so it's simpler to always use SHA-256 rather than check if SHA-224 is available. --- library/ssl_cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_cookie.c b/library/ssl_cookie.c index 56e9bdd2b..6f0be8a26 100644 --- a/library/ssl_cookie.c +++ b/library/ssl_cookie.c @@ -50,7 +50,7 @@ * with max 32 bytes of cookie for DTLS 1.0 */ #if defined(MBEDTLS_SHA256_C) -#define COOKIE_MD MBEDTLS_MD_SHA224 +#define COOKIE_MD MBEDTLS_MD_SHA256 #define COOKIE_MD_OUTLEN 32 #define COOKIE_HMAC_LEN 28 #elif defined(MBEDTLS_SHA512_C)