Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

spezielle library Version angeben?

4 views
Skip to first unread message

Ulli Horlacher

unread,
Aug 30, 2021, 11:26:35 AM8/30/21
to
Ich brauch die neuste stunnel Version wegen bestimmten features.
Compilieren via configure / make funktioniert, allerdings wird nicht die
neuste libssl gelinkt:

root@fex01:/opt/src/stunnel-5.60# ldd ./src/stunnel | grep ssl
libssl.so.10 => /lib64/libssl.so.10 (0x00007fe157846000)

root@fex01:/opt/src/stunnel-5.60# ll /lib64/libssl.so*
lrwxrwxrwx root root - 2020-12-19 07:57:59 /lib64/libssl.so -> libssl.so.1.0.2k
-rwxr-xr-x root root 470,376 2020-12-16 22:24:17 /lib64/libssl.so.1.0.2k
lrwxrwxrwx root root - 2021-04-14 21:06:16 /lib64/libssl.so.1.1 -> libssl.so.1.1.1g
-rwxr-xr-x root root 603,568 2021-03-30 01:50:54 /lib64/libssl.so.1.1.1g
lrwxrwxrwx root root - 2020-12-19 07:57:57 /lib64/libssl.so.10 -> libssl.so.1.0.2k

root@fex01:/opt/src/stunnel-5.60# grep lssl src/Makefile
stunnel_LDFLAGS = -L$(SSLDIR)/lib64 -L$(SSLDIR)/lib -lssl -lcrypto

configure bietet keine Option eine bestimmte openssl Version zu erzwingen.

stunnel laeuft zwar mit libssl.so.1.0.2, aber das enthaelt im Gegensatz zu
libssl.so.1.1.1 kein TLS1.3

Wenn ich in /opt/src/stunnel-5.60/src/Makefile reinschreibe:

stunnel_LDFLAGS = -L$(SSLDIR)/lib64 -L$(SSLDIR)/lib -l:libssl.so.1.1 -l:libcrypto.so.1.1

fuehrt das zu:

Making all in src
make[1]: Entering directory `/opt/src/stunnel-5.60/src'
make all-am
make[2]: Entering directory `/opt/src/stunnel-5.60/src'
CCLD stunnel
stunnel-tls.o: In function `tls_init':
/opt/src/stunnel-5.60/src/tls.c:59: undefined reference to `CRYPTO_set_mem_ex_functions'
stunnel-client.o: In function `ssl_start':
/opt/src/stunnel-5.60/src/client.c:553: undefined reference to `SSLeay'
/opt/src/stunnel-5.60/src/client.c:554: undefined reference to `SSLeay'
/opt/src/stunnel-5.60/src/client.c:555: undefined reference to `SSLeay'
stunnel-options.o: In function `psk_read':
/opt/src/stunnel-5.60/src/options.c:4150: undefined reference to `string_to_hex'
stunnel-options.o: In function `key_read':
/opt/src/stunnel-5.60/src/options.c:4241: undefined reference to `string_to_hex'
stunnel-options.o: In function `parse_global_option':
/opt/src/stunnel-5.60/src/options.c:735: undefined reference to `SSLeay'
stunnel-options.o: In function `tls_methods_set':
/opt/src/stunnel-5.60/src/options.c:3941: undefined reference to `SSLv23_client_method'
/opt/src/stunnel-5.60/src/options.c:3942: undefined reference to `SSLv23_server_method'
/opt/src/stunnel-5.60/src/options.c:3938: undefined reference to `SSLv23_client_method'
/opt/src/stunnel-5.60/src/options.c:3939: undefined reference to `SSLv23_server_method'
(...)

Vorschlaege?

OS ist Centos 7.9, installiert ist:

root@fex01:/opt/src/stunnel-5.60# rpm -qa | grep openssl | sort
openssl-1.0.2k-21.el7_9.x86_64
openssl-devel-1.0.2k-21.el7_9.x86_64
openssl-libs-1.0.2k-21.el7_9.i686
openssl-libs-1.0.2k-21.el7_9.x86_64
openssl11-1.1.1g-3.el7.x86_64
openssl11-devel-1.1.1g-3.el7.x86_64
openssl11-libs-1.1.1g-3.el7.x86_64


--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horl...@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/

Michael Bäuerle

unread,
Aug 30, 2021, 12:08:05 PM8/30/21
to
Da passen dann die Header-Dateien und die Bibliotheken nicht zusammen.

> OS ist Centos 7.9, installiert ist:
>
> root@fex01:/opt/src/stunnel-5.60# rpm -qa | grep openssl | sort
> openssl-1.0.2k-21.el7_9.x86_64
> openssl-devel-1.0.2k-21.el7_9.x86_64
> openssl-libs-1.0.2k-21.el7_9.i686
> openssl-libs-1.0.2k-21.el7_9.x86_64
> openssl11-1.1.1g-3.el7.x86_64
> openssl11-devel-1.1.1g-3.el7.x86_64
> openssl11-libs-1.1.1g-3.el7.x86_64

In "openssl-devel" bzw. "openssl11-devel" sollten die jeweiligen
Header-Dateien drin sein.

Schneller Hack, damit das funktioniert, was du oben versucht hast:
Das Paket "openssl-devel" temporär deinstallieren. Vermutlich werden
dann die gewünschten Header-Dateien aus "openssl11-devel" automatisch
gefunden.

Die "richtige" Lösung wäre, beim bauen anzugeben, wo die HeaderDateien
gesucht werden sollen. Das sollte mit "-I<Pfad>" in CPPFLAGS gehen
(oder CFLAGS, falls CPPFLAGS nicht ausgewertet wird).

Michael Bäuerle

unread,
Aug 30, 2021, 12:12:13 PM8/30/21
to
Da passen dann die Header-Dateien und die Bibliotheken nicht zusammen.

> OS ist Centos 7.9, installiert ist:
>
> root@fex01:/opt/src/stunnel-5.60# rpm -qa | grep openssl | sort
> openssl-1.0.2k-21.el7_9.x86_64
> openssl-devel-1.0.2k-21.el7_9.x86_64
> openssl-libs-1.0.2k-21.el7_9.i686
> openssl-libs-1.0.2k-21.el7_9.x86_64
> openssl11-1.1.1g-3.el7.x86_64
> openssl11-devel-1.1.1g-3.el7.x86_64
> openssl11-libs-1.1.1g-3.el7.x86_64

In "openssl-devel" bzw. "openssl11-devel" sollten die jeweiligen
Header-Dateien drin sein.

Schneller Hack, damit das funktioniert, was du oben versucht hast:
Das Paket "openssl-devel" temporär deinstallieren. Vermutlich werden
dann die gewünschten Header-Dateien aus "openssl11-devel" automatisch
gefunden.

Die "richtige" Lösung wäre, beim bauen anzugeben, wo die Header-Dateien
0 new messages