"this version of mod_ssl was compiled against a newer library" after compiling Apache with custom OpenSSL
Asked Answered
C

1

6

I've compiled and installed a newer version of OpenSSL, then performed a clean install of Apache, but it fails to start with the following messages in log:

[Mon Mar 30 15:20:13.302086 2020] [ssl:warn] [pid 25350:tid 139644483991296] AH01882: Init: this version of mod_ssl was compiled against a newer library (Ope
nSSL 1.0.1e 11 Feb 2013, version currently loaded is OpenSSL 0.9.8j-fips 07 Jan 2009) - may result in undefined or erroneous behavior
[Mon Mar 30 15:20:13.302348 2020] [ssl:info] [pid 25350:tid 139644483991296] AH01887: Init: Initializing (virtual) servers for SSL

Guide that I used: How to upgrade openssl 0.9.8 to 1.0.2 with mod_ssl in Apache 2.2.9

Environment

$ ldd /opt/apache2/modules/mod_ssl.so
        linux-vdso.so.1 =>  (0x00007ffc2bd43000)
        libssl.so.1.0.0 => /opt/openssl/lib/libssl.so.1.0.0 (0x00007f4943eb6000)
        libcrypto.so.1.0.0 => /opt/openssl/lib/libcrypto.so.1.0.0 (0x00007f4943ae0000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f49438d7000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f494369c000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f494347f000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f494327b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f4942eff000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4944373000)

$ openssl version
OpenSSL 0.9.8j-fips 07 Jan 2009
$ /opt/openssl/bin/openssl version
OpenSSL 1.0.1e 11 Feb 2013
$ sudo /opt/apache2/bin/httpd -v
Server version: Apache/2.4.41 (Unix)
Server built:   Mar 30 2020 14:54:51

OS: SLES 11 SP4 (that's the reason why I decided to compile OpenSSL)

How can I fix it?

Cufic answered 30/3, 2020 at 15:39 Comment(1)
Also following, as uninstalling/installing did not resolve for me, either :(Maimonides
N
0

You need to start the httpd service with LD_LIBRARY_PATH set to the lib directory for the newer openssl version.

Like so (substitute paths to openssl and apache with your specific paths):

sudo LD_LIBRARY_PATH=/opt/openssl-3.1.2/lib/64 /usr/local/apache24/bin/apachectl start
Neoclassicism answered 23/8, 2023 at 16:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.