muquit / mailsend

A program to send mail via SMTP from command line
Other
297 stars 68 forks source link

OpenSSL 1.1.0 #141

Open glewis64 opened 6 years ago

glewis64 commented 6 years ago

Attempting a Linux (RHEL 6.4) build of mailsend v1.20b1 against OpenSSL v1.1.0 with enable-static-engine to embed OpenSSL in mailsend executable. Doing a short google revealed that the OpenSSL method DSO_METHOD_dlfcn was removed in 1.1 and the configure script is reporting "OpenSSL has unsupported dynamic loading".

Is there a work around for this?

Here's the pertinent information from config.log:

configure:5754: gcc -o conftest -g -O2 -Wall conftest.c -lresolv -lnsl -L/usr/local/ssl_110//lib -lssl -lcrypto -ldl >&5 conftest.c: In function 'main': conftest.c:51: warning: implicit declaration of function 'DSO_METHOD_dlfcn' /tmp/ccUIU4Mr.o: In function main': /git/mailsend-1.20b1/conftest.c:51: undefined reference toDSO_METHOD_dlfcn' collect2: ld returned 1 exit status configure:5754: $? = 1 configure: failed program was: / confdefs.h / #define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_STRING_H 1 #define HAVE_STRINGS_H 1 #define HAVE_MEMORY_H 1 #define HAVE_MALLOC_H 1 #define HAVE_UNISTD_H 1 #define HAVE_CTYPE_H 1 #define HAVE_STDINT_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_STDLIB_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_FILE_H 1 #define HAVE_LIMITS_H 1 #define HAVE_FLOCK 1 #define HAVE_SOCKET 1 #define HAVE_HTONL 1 #define HAVE_GETHOSTNAME 1 #define HAVE_GETHOSTBYADDR 1 #define HAVE_YP_GET_DEFAULT_DOMAIN 1 #define HAVE_LIBNSL 1 #define HAVE_RES_SEARCH 1 #define HAVE_LIBRESOLV 1 #define HAVE_INET_ATON 1 #define HAVE_DN_SKIPNAME 1 #define HAVE_MKSTEMP 1 #define HAVE_GETADDRINFO 1 #define HAVE_OPENSSL 1 / end confdefs.h. /
#include <openssl/err.h>
int
main ()
{
DSO_METHOD_dlfcn();
;
return 0;
}

configure:5760: result: unknown configure:5762: result: OpenSSL has unsupported dynamic loading

The same section from config.log when linking against OpenSSL v1.0.2p:

configure:5754: gcc -o conftest -g -O2 -Wall conftest.c -lresolv -lnsl -L/usr/local/ssl_102p//lib -lssl -lcrypto -ldl >&5 conftest.c: In function 'main': conftest.c:51: warning: implicit declaration of function 'DSO_METHOD_dlfcn' configure:5754: $? = 0 configure:5755: result: yes

muquit commented 6 years ago

configure.in needs to be updated to detect if OpenSSL supports -ldl. However, mailsend should link with OpenSSL fine.

glewis64 commented 6 years ago

I would agree. However, until it’s fixed I won’t be able to upgrade OpenSSL to 1.1 since we want it embedded in the mailsend executable.

Any idea when that would be available? Gayle From: muquit [mailto:notifications@github.com] Sent: Thursday, August 30, 2018 11:47 AM To: muquit/mailsend mailsend@noreply.github.com Cc: Gayle Lewis glewis@agtrax.com; Author author@noreply.github.com Subject: Re: [muquit/mailsend] OpenSSL 1.1.0 (#141)

configure.in needs to be updated to detect if OpenSSL supports -ldl. However, mailsend should link with OpenSSL fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/muquit/mailsend/issues/141#issuecomment-417387949, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AogdiscK2V6uaP4eJahy8OCkycQsXBylks5uWBcRgaJpZM4WTwPL.

muquit commented 6 years ago

You can do it today without any change. This is an example on Ubuntu with OpenSSL 1.1.0i

./configure --with-openssl=/path/ssl110istatic
make

Thanks.

codeyoulateralligator commented 2 years ago

Hmm, does not work for me:

raigo@A224:~/Devel/mailsend$ ./configure --with-openssl=/home/raigo/ssl110istatic checking for ranlib... ranlib checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for memory.h... (cached) yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for unistd.h... (cached) yes checking ctype.h usability... yes checking ctype.h presence... yes checking for ctype.h... yes checking for stdint.h... (cached) yes checking for sys/types.h... (cached) yes checking for stdlib.h... (cached) yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking sys/syslimits.h usability... no checking sys/syslimits.h presence... no checking for sys/syslimits.h... no checking for strip... /usr/bin/strip checking for flock... yes checking for socket... yes checking for htonl... yes checking for gethostname... yes checking for gethostbyaddr... yes checking for yp_get_default_domain... no checking for yp_get_default_domain... no checking for yp_get_default_domain in -lnsl... yes checking for res_search... no checking for res_search... no checking for res_search in -lresolv... no checking for res_search in -lresolv... yes checking for inet_aton... yes checking for dn_skipname... no checking for dn_skipname... yes checking for mkstemp... yes checking for getaddrinfo... yes checking for OpenSSL... yes checking whether linking with OpenSSL requires -ldl... unknown OpenSSL has unsupported dynamic loading checking if masterkey should be generated... no configure: creating ./config.status config.status: creating Makefile config.status: creating libs/libmsock/Makefile config.status: creating libs/libmutils/mkey.c config.status: creating libs/libmutils/Makefile config.status: creating libs/libsll/Makefile

It does compile, but without ssl, raigo@A224:~/Devel/mailsend$ ldd mailsend linux-vdso.so.1 (0x00007ffff7dec000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5d1c5d9000) /lib64/ld-linux-x86-64.so.2 (0x00007f5d1c802000)

Version: @(#) mailsend v1.20b2 Copyright: BSD. It is illegal to use this software for Spamming (Not compiled with OpenSSL)

Which openssl versions are supported?