]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl: Build local DH of right size when needed
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Fri, 11 Feb 2022 11:04:53 +0000 (12:04 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 14 Feb 2022 09:07:14 +0000 (10:07 +0100)
commitbed72631f97d141c8878392a7441fde56192f103
tree9fa09baab5f3c91d8e3d7e256c945780aee77b71
parent7f6425a130c1b34434d546741b6242dbdafb5406
MINOR: ssl: Build local DH of right size when needed

The current way the local DH structures are built relies on the fact
that the ssl_get_tmp_dh function would only be called as a callback
during a DHE negotiation, so after all the SSL contexts are built and
the init is over. With OpenSSLv3, this function will now be called
during init, so before those objects are curretly built.
This patch ensures that when calling ssl_get_tmp_dh and trying to use
one of or hard-coded DH parameters, it will be created if it did not
exist yet.
The current DH parameter creation is also kept so that with versions
before OpenSSLv3 we don't end up creating this DH object during a
handshake.
src/ssl_sock.c