BUILD: ssl: improve SSL_CTX_set_ecdh_auto compatibility
authorLukas Tribus <lukas@ltri.eu>
Fri, 20 Dec 2019 17:47:18 +0000 (18:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 21 Dec 2019 11:02:10 +0000 (12:02 +0100)
commitadb6019d31a0632a4d322ac652a53deddc90a420
tree01514b41ff3aaffcc6c7293b4478fcdd9fa20341
parent90f3afd226ac32d8e5d639fd94bfb58407a8bf32
BUILD: ssl: improve SSL_CTX_set_ecdh_auto compatibility

SSL_CTX_set_ecdh_auto() is not defined when OpenSSL 1.1.1 is compiled
with the no-deprecated option. Remove existing, incomplete guards and
add a compatibility macro in openssl-compat.h, just as OpenSSL does:

https://github.com/openssl/openssl/blob/bf4006a6f9be691ba6eef0e8629e63369a033ccf/include/openssl/ssl.h#L1486

This should be backported as far as 2.0 and probably even 1.9.

(cherry picked from commit a26d1e13245a760bd422e4e4b6a85cc17f9f0a60)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/common/openssl-compat.h
src/ssl_sock.c