Turn lack of md5 support in mbedTLS into a compile error
authorFabian Keil <fk@fabiankeil.de>
Wed, 26 Feb 2020 08:49:03 +0000 (09:49 +0100)
committerFabian Keil <fk@fabiankeil.de>
Fri, 28 Feb 2020 06:31:27 +0000 (07:31 +0100)
Previously the TLS code simply wouldn't work properly.

Sponsored by: Robert Klemme

ssl.c

diff --git a/ssl.c b/ssl.c
index fb3e9ef..0172b02 100644 (file)
--- 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),