Система Ubuntu 22.04. Со стандартным OpenSSL 3.0.2 не собирается:
../../src/ssl/gadgets.h:61:51: error: 'void RSA_free(RSA*)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
61 | typedef std::unique_ptr<RSA, HardFun<void, RSA*, &RSA_free>> RSA_Pointer;
Поставил из исходников старый openssl 1.1.1j. Экспортировал переменные окружения:
export PATH="/usr/local/openssl_1_1_1j/bin:$PATH" LD_LIBRARY_PATH="/usr/local/openssl_1_1_1j/lib:$LD_LIBRARY_PATH"
vodka@vodka-PC:/tmp/squid-5.5$ openssl version
OpenSSL 1.1.1j 16 Feb 2021
Скачал squid, конфигурирую со старым openssl:
wget http://www.squid-cache.org/Versions/v5/squid-5.5.tar.gz
tar -xzvf ./squid-5.5.tar.gz
cd squid-5.5/
./configure --enable-ssl-crtd --with-openssl=/usr/local/openssl_1_1_1j/lib
Проходит без ошибок. Но при make валится:
libtool: compile: g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/usr/local/squid/share\" -DDEFAULT_SQUID_CONFIG_DIR=\"/usr/local/squid/etc\" -I../.. -I../../include -I../../lib -I../../src -I../../include -I/usr/local/openssl_1_1_1j/lib/include -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual -Werror -pipe -D_REENTRANT -I/usr/include/libxml2 -g -O2 -march=native -MT old_api.lo -MD -MP -MF .deps/old_api.Tpo -c old_api.cc -fPIC -DPIC -o .libs/old_api.o
In file included from ../../src/security/Session.h:14,
from ../../src/security/forward.h:15,
from ../../src/SquidConfig.h:26,
from old_api.cc:24:
../../src/security/forward.h: In function 'void Security::DH_free_cpp(DH*)':
../../src/security/LockingPointer.h:34:21: error: 'void DH_free(DH*)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
34 | function(a); \
../../src/security/forward.h:96:1: note: in expansion of macro 'CtoCpp1'
96 | CtoCpp1(DH_free, DH *);
| ^~~~~~~
In file included from ../../compat/openssl.h:35,
from ../../src/security/Context.h:15,
from ../../src/security/forward.h:14,
from ../../src/SquidConfig.h:26,
from old_api.cc:24:
/usr/include/openssl/dh.h:200:28: note: declared here
Собственно, что ещё нужно сделать, чтобы make подхватывал старый openssl вместо системного?