1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[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.
This commit is contained in:
Witold Filipczyk 2022-01-10 20:23:47 +01:00
parent 08c71e5289
commit 89f99a0667
3 changed files with 2 additions and 22 deletions

View File

@ -10,13 +10,6 @@ OBJS-$(CONFIG_CSS) += scanner.o
OBJS-$(CONFIG_DEBUG) += memdebug.o OBJS-$(CONFIG_DEBUG) += memdebug.o
OBJS-$(CONFIG_DOM) += scanner.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) ifeq ($(CONFIG_BITTORRENT),yes)
OBJS-$(CONFIG_BITTORRENT) += scanner.o OBJS-$(CONFIG_BITTORRENT) += scanner.o
# BitTorrent is the only user. Compile in SHA1 if testing libc or # BitTorrent is the only user. Compile in SHA1 if testing libc or
@ -33,6 +26,7 @@ OBJS = \
error.o \ error.o \
file.o \ file.o \
hash.o \ hash.o \
md5.o \
memlist.o \ memlist.o \
memory.o \ memory.o \
random.o \ random.o \

View File

@ -1,18 +1,7 @@
#ifndef EL__UTIL_MD5_H #ifndef EL__UTIL_MD5_H
#define 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 #define CONFIG_MD5 1
#elif defined(CONFIG_OPENSSL)
#include <openssl/md5.h>
#elif defined(CONFIG_GNUTLS_OPENSSL_COMPAT)
#include <gnutls/openssl.h>
#else
#define CONFIG_MD5 1
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -12,9 +12,6 @@ endif
if conf_data.get('CONFIG_DOM') if conf_data.get('CONFIG_DOM')
srcs += files('scanner.c') srcs += files('scanner.c')
endif 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_BITTORRENT')
if conf_data.get('CONFIG_OWN_LIBC') or not conf_data.get('CONFIG_OPENSSL') if conf_data.get('CONFIG_OWN_LIBC') or not conf_data.get('CONFIG_OPENSSL')
srcs += files('sha1.c') srcs += files('sha1.c')
@ -22,4 +19,4 @@ if conf_data.get('CONFIG_BITTORRENT')
endif endif
srcs += files('base64.c', 'color.c', 'conv.c', 'env.c', 'error.c', 'file.c', 'hash.c', 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')