From 89f99a0667a05f99f309f1402eaf24db63249ab4 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 10 Jan 2022 20:23:47 +0100 Subject: [PATCH] [md5] Force to use own implementation of MD5 MD5 in openssl-3.0 is deprecated, so to avoid warnings was switched to ELink's version. --- src/util/Makefile | 8 +------- src/util/md5.h | 11 ----------- src/util/meson.build | 5 +---- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/util/Makefile b/src/util/Makefile index ecad54d66..f7fac6300 100644 --- a/src/util/Makefile +++ b/src/util/Makefile @@ -10,13 +10,6 @@ OBJS-$(CONFIG_CSS) += scanner.o OBJS-$(CONFIG_DEBUG) += memdebug.o OBJS-$(CONFIG_DOM) += scanner.o -# Use own MD5 implementation if testing libc or there's no OpenSSL -# (either the real thing or GNUTLS compat wrappers). -OBJS-$(CONFIG_OWN_LIBC) += md5.o -ifeq ($(CONFIG_GNUTLS_OPENSSL_COMPAT),no) -OBJS-unless$(CONFIG_OPENSSL) += md5.o -endif - ifeq ($(CONFIG_BITTORRENT),yes) OBJS-$(CONFIG_BITTORRENT) += scanner.o # BitTorrent is the only user. Compile in SHA1 if testing libc or @@ -33,6 +26,7 @@ OBJS = \ error.o \ file.o \ hash.o \ + md5.o \ memlist.o \ memory.o \ random.o \ diff --git a/src/util/md5.h b/src/util/md5.h index bb4b255c3..3a9a43108 100644 --- a/src/util/md5.h +++ b/src/util/md5.h @@ -1,18 +1,7 @@ #ifndef EL__UTIL_MD5_H #define EL__UTIL_MD5_H - -/* Optionally MD5 support can depend on external implementation when linking - * against a SSL library that supports it. */ -#if defined(CONFIG_OWN_LIBC) #define CONFIG_MD5 1 -#elif defined(CONFIG_OPENSSL) -#include -#elif defined(CONFIG_GNUTLS_OPENSSL_COMPAT) -#include -#else -#define CONFIG_MD5 1 -#endif #ifdef __cplusplus extern "C" { diff --git a/src/util/meson.build b/src/util/meson.build index 54039e45d..8a27a2f58 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -12,9 +12,6 @@ endif if conf_data.get('CONFIG_DOM') srcs += files('scanner.c') endif -if conf_data.get('CONFIG_OWN_LIBC') or (not conf_data.get('CONFIG_GNUTLS_OPENSSL_COMPAT') and not conf_data.get('CONFIG_OPENSSL')) - srcs += files('md5.c') -endif if conf_data.get('CONFIG_BITTORRENT') if conf_data.get('CONFIG_OWN_LIBC') or not conf_data.get('CONFIG_OPENSSL') srcs += files('sha1.c') @@ -22,4 +19,4 @@ if conf_data.get('CONFIG_BITTORRENT') endif srcs += files('base64.c', 'color.c', 'conv.c', 'env.c', 'error.c', 'file.c', 'hash.c', - 'memlist.c', 'memory.c', 'random.c', 'secsave.c', 'snprintf.c', 'string.c', 'time.c') + 'md5.c', 'memlist.c', 'memory.c', 'random.c', 'secsave.c', 'snprintf.c', 'string.c', 'time.c')