I tried to compile with OpenSSL 1.1.1l and got the following error.
OpenSSL Version
openssl version -a
OpenSSL 1.1.1l 24 Aug 2021
built on: Fri Oct 15 16:50:01 2021 UTC
platform: linux-x86_64
options: bn(64,64) rc4(16x,int) des(int) idea(int) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,–noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DZLIB -DNDEBUG
OPENSSLDIR: “/usr/local/openssl”
ENGINESDIR: “/usr/local/openssl/lib/engines-1.1”
Seeding source: os-specific
Error
make TARGET=linux-glibc USE_NS=1 USE_TFO=1 USE_PCRE=1 USE_ZLIB=1 USE_CRYPT_H=1 USE_LIBCRYPT=1 USE_OPENSSL=1 SSL_INC=/usr/local/openssl/include/openssl SSL_LIB=/usr/local/openssl/lib
CC src/ssl_sock.o
src/ssl_sock.c: In function ‘ssl_sock_dump_errors’:
src/ssl_sock.c:656:12: warning: ‘ERR_func_error_string’ is deprecated (declared at /usr/local/include/openssl/err.h:447): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ERR_func_error_string(ret), ERR_reason_error_string(ret));
^
src/ssl_sock.c: In function ‘ssl_init_single_engine’:
src/ssl_sock.c:670:2: warning: ‘ENGINE_by_id’ is deprecated (declared at /usr/local/include/openssl/engine.h:336): Since OpenSSL 3.0 [-Wdeprecated-declarations]
engine = ENGINE_by_id(engine_id);
^
src/ssl_sock.c:676:2: warning: ‘ENGINE_init’ is deprecated (declared at /usr/local/include/openssl/engine.h:620): Since OpenSSL 3.0 [-Wdeprecated-declarations]
if (!ENGINE_init(engine)) {
^
src/ssl_sock.c:682:2: warning: ‘ENGINE_set_default_string’ is deprecated (declared at /usr/local/include/openssl/engine.h:685): Since OpenSSL 3.0 [-Wdeprecated-declarations]
if (ENGINE_set_default_string(engine, def_algorithms) == 0) {
^
src/ssl_sock.c:700:2: warning: ‘ENGINE_finish’ is deprecated (declared at /usr/local/include/openssl/engine.h:628): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ENGINE_finish(engine);
^
src/ssl_sock.c:704:2: warning: ‘ENGINE_free’ is deprecated (declared at /usr/local/include/openssl/engine.h:493): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ENGINE_free(engine);
^
src/ssl_sock.c: In function ‘ssl_tlsext_ticket_key_cb’:
src/ssl_sock.c:1107:4: warning: ‘HMAC_Init_ex’ is deprecated (declared at /usr/local/include/openssl/hmac.h:43): Since OpenSSL 3.0 [-Wdeprecated-declarations]
HMAC_Init_ex(hctx, keys[head].key_128.hmac_key, 16, TLS_TICKET_HASH_FUNCT(), NULL);
^
src/ssl_sock.c:1115:4: warning: ‘HMAC_Init_ex’ is deprecated (declared at /usr/local/include/openssl/hmac.h:43): Since OpenSSL 3.0 [-Wdeprecated-declarations]
HMAC_Init_ex(hctx, keys[head].key_256.hmac_key, 32, TLS_TICKET_HASH_FUNCT(), NULL);
^
src/ssl_sock.c:1128:4: warning: ‘HMAC_Init_ex’ is deprecated (declared at /usr/local/include/openssl/hmac.h:43): Since OpenSSL 3.0 [-Wdeprecated-declarations]
HMAC_Init_ex(hctx, keys[(head + i) % TLS_TICKETS_NO].key_128.hmac_key, 16, TLS_TICKET_HASH_FUNCT(), NULL);
^
src/ssl_sock.c:1135:4: warning: ‘HMAC_Init_ex’ is deprecated (declared at /usr/local/include/openssl/hmac.h:43): Since OpenSSL 3.0 [-Wdeprecated-declarations]
HMAC_Init_ex(hctx, keys[(head + i) % TLS_TICKETS_NO].key_256.hmac_key, 32, TLS_TICKET_HASH_FUNCT(), NULL);
^
src/ssl_sock.c: In function ‘ssl_sock_do_create_cert’:
src/ssl_sock.c:2059:2: warning: ‘SSL_CTX_set_tmp_dh_callback’ is deprecated (declared at /usr/local/include/openssl/ssl.h:2213): Since OpenSSL 3.0 [-Wdeprecated-declarations]
SSL_CTX_set_tmp_dh_callback(ssl_ctx, ssl_get_tmp_dh);
^
src/ssl_sock.c:2069:3: warning: ‘EC_KEY_new_by_curve_name’ is deprecated (declared at /usr/local/include/openssl/ec.h:996): Since OpenSSL 3.0 [-Wdeprecated-declarations]
if (!(ecc = EC_KEY_new_by_curve_name(nid)))
^
src/ssl_sock.c:2072:3: warning: ‘EC_KEY_free’ is deprecated (declared at /usr/local/include/openssl/ec.h:1001): Since OpenSSL 3.0 [-Wdeprecated-declarations]
EC_KEY_free(ecc);
^
In file included from include/haproxy/openssl-compat.h:7:0,
from include/haproxy/listener-t.h:37,
from include/haproxy/server-t.h:36,
from include/haproxy/lb_map-t.h:26,
from include/haproxy/backend-t.h:30,
from include/haproxy/proxy-t.h:35,
from include/haproxy/applet-t.h:31,
from include/haproxy/action-t.h:25,
from include/haproxy/stream.h:25,
from include/haproxy/channel.h:30,
from src/ssl_sock.c:51:
src/ssl_sock.c: In function ‘ctx_set_TLSv13_func’:
src/ssl_sock.c:2273:5: error: missing binary operator before token “1”
#if SSL_OP_NO_TLSv1_3
^
src/ssl_sock.c: In function ‘ssl_set_TLSv13_func’:
src/ssl_sock.c:2279:5: error: missing binary operator before token “1”
#if SSL_OP_NO_TLSv1_3
^
src/ssl_sock.c: In function ‘ssl_get_dh_1024’:
src/ssl_sock.c:2697:2: warning: ‘DH_new’ is deprecated (declared at /usr/local/include/openssl/dh.h:199): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH *dh = DH_new();
^
src/ssl_sock.c:2703:4: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(dh);
^
src/ssl_sock.c:2706:4: warning: ‘DH_set0_pqg’ is deprecated (declared at /usr/local/include/openssl/dh.h:255): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_set0_pqg(dh, p, NULL, g);
^
src/ssl_sock.c: In function ‘ssl_get_dh_2048’:
src/ssl_sock.c:2744:2: warning: ‘DH_new’ is deprecated (declared at /usr/local/include/openssl/dh.h:199): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH *dh = DH_new();
^
src/ssl_sock.c:2750:4: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(dh);
^
src/ssl_sock.c:2753:4: warning: ‘DH_set0_pqg’ is deprecated (declared at /usr/local/include/openssl/dh.h:255): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_set0_pqg(dh, p, NULL, g);
^
src/ssl_sock.c: In function ‘ssl_get_dh_4096’:
src/ssl_sock.c:2812:2: warning: ‘DH_new’ is deprecated (declared at /usr/local/include/openssl/dh.h:199): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH *dh = DH_new();
^
src/ssl_sock.c:2818:4: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(dh);
^
src/ssl_sock.c:2821:4: warning: ‘DH_set0_pqg’ is deprecated (declared at /usr/local/include/openssl/dh.h:255): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_set0_pqg(dh, p, NULL, g);
^
src/ssl_sock.c: In function ‘ssl_sock_get_dh_from_file’:
src/ssl_sock.c:2872:2: warning: ‘PEM_read_bio_DHparams’ is deprecated (declared at /usr/local/include/openssl/pem.h:469): Since OpenSSL 3.0 [-Wdeprecated-declarations]
dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
^
src/ssl_sock.c: In function ‘ssl_sock_load_dh_params’:
src/ssl_sock.c:3093:4: warning: ‘SSL_CTX_set_tmp_dh_callback’ is deprecated (declared at /usr/local/include/openssl/ssl.h:2213): Since OpenSSL 3.0 [-Wdeprecated-declarations]
SSL_CTX_set_tmp_dh_callback(ctx, ssl_get_tmp_dh);
^
src/ssl_sock.c: In function ‘ssl_sock_prepare_ctx’:
src/ssl_sock.c:4490:3: warning: ‘EC_KEY_new_by_curve_name’ is deprecated (declared at /usr/local/include/openssl/ec.h:996): Since OpenSSL 3.0 [-Wdeprecated-declarations]
if (!i || ((ecdh = EC_KEY_new_by_curve_name(i)) == NULL)) {
^
src/ssl_sock.c:4497:4: warning: ‘EC_KEY_free’ is deprecated (declared at /usr/local/include/openssl/ec.h:1001): Since OpenSSL 3.0 [-Wdeprecated-declarations]
EC_KEY_free(ecdh);
^
src/ssl_sock.c: In function ‘__ssl_sock_init’:
src/ssl_sock.c:7129:2: warning: ‘ENGINE_load_builtin_engines’ is deprecated (declared at /usr/local/include/openssl/engine.h:358): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ENGINE_load_builtin_engines();
^
src/ssl_sock.c:7149:2: warning: ‘ERR_load_SSL_strings’ is deprecated (declared at /usr/local/include/openssl/sslerr_legacy.h:29): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ERR_load_SSL_strings();
^
src/ssl_sock.c: In function ‘ssl_free_engines’:
src/ssl_sock.c:7225:3: warning: ‘ENGINE_finish’ is deprecated (declared at /usr/local/include/openssl/engine.h:628): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ENGINE_finish(wl->e);
^
src/ssl_sock.c:7226:3: warning: ‘ENGINE_free’ is deprecated (declared at /usr/local/include/openssl/engine.h:493): Since OpenSSL 3.0 [-Wdeprecated-declarations]
ENGINE_free(wl->e);
^
src/ssl_sock.c: In function ‘ssl_free_dh’:
src/ssl_sock.c:7236:3: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(local_dh_1024);
^
src/ssl_sock.c:7240:3: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(local_dh_2048);
^
src/ssl_sock.c:7244:3: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(local_dh_4096);
^
src/ssl_sock.c:7248:3: warning: ‘DH_free’ is deprecated (declared at /usr/local/include/openssl/dh.h:200): Since OpenSSL 3.0 [-Wdeprecated-declarations]
DH_free(global_dh);
^
make: *** [src/ssl_sock.o] Error 1