]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl: Remove EC_KEY related calls when preparing SSL context
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Tue, 8 Feb 2022 16:45:54 +0000 (17:45 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 9 Feb 2022 10:15:44 +0000 (11:15 +0100)
commitff4c3c4c9efef6d8388235e0ef5f8b22e90e4a22
tree021d3dad464870c0e4f6b99e944fcfa612cdd59e
parent2559bc831885b7a8462822eee5c2b78232a60ea0
MINOR: ssl: Remove EC_KEY related calls when preparing SSL context

The ecdhe option relies on the SSL_CTX_set_tmp_ecdh function which has
been marked as deprecated in OpenSSLv3. As advised in the
SSL_CTX_set_tmp_ecdh manpage, this function should be replaced by the
SSL_CTX_set1_groups one (or the SSL_CTX_set1_curves one in our case
which does the same but existed on older OpenSSL versions as well).

When using the "curves" option we have a different behaviour with
OpenSSL1.0.2 compared to later versions. On this early version an SSL
backend using a P-256 ECDSA certificate manages to connect to an SSL
frontend having a "curves P-384" option (when it fails with later
versions).
Even if the API used for later version than OpenSSL 1.0.2 already
existed then, for some reason the behaviour is not the same on the older
version which explains why the original code with the deprecated API is
kept for this version (otherwise we would risk breaking everything on a
version that might still be used by some people despite being pretty old).

This patch should be strictly isofunctional.
src/ssl_sock.c