From 6787575a388cbfd241613660b680d720de04305f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 26 Feb 2020 09:49:03 +0100 Subject: [PATCH] Turn lack of md5 support in mbedTLS into a compile error Previously the TLS code simply wouldn't work properly. Sponsored by: Robert Klemme --- ssl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ssl.c b/ssl.c index fb3e9ef3..0172b02a 100644 --- a/ssl.c +++ b/ssl.c @@ -1945,9 +1945,7 @@ static int host_to_hash(struct client_state *csp) int ret = 0; #if !defined(MBEDTLS_MD5_C) - log_error(LOG_LEVEL_ERROR, "MBEDTLS_MD5_C is not defined. Can't create" - "MD5 hash for certificate and key name."); - return -1; +#error mbedTLS needs to be compiled with md5 support #else memset(csp->http->hash_of_host, 0, sizeof(csp->http->hash_of_host)); mbedtls_md5((unsigned char *)csp->http->host, strlen(csp->http->host), -- 2.39.2