BUG/MINOR: ssl: clear the SSL errors on DH loading failure
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 5 Feb 2020 10:46:33 +0000 (11:46 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 5 Feb 2020 15:03:36 +0000 (16:03 +0100)
commit4221eb75ed1d5154fd6c5251e6573e07b8f6ff5f
treef8df4e0044f2797c8795680d56ba6007452f2dfe
parent3017d288dfd42e632e1c18575c356ec4ae5e297d
BUG/MINOR: ssl: clear the SSL errors on DH loading failure

In ssl_sock_load_dh_params(), if haproxy failed to apply the dhparam
with SSL_CTX_set_tmp_dh(), it will apply the DH with
SSL_CTX_set_dh_auto().

The problem is that we don't clean the OpenSSL errors when leaving this
function so it could fail to load the certificate, even if it's only a
warning.

Fixes bug #483.

Must be backported in 2.1.

(cherry picked from commit 4dd145a888c7679812664bf2f246fa8199e94ab0)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
src/ssl_sock.c