BUG/MEDIUM: ssl: error when no certificate are found
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 20 Nov 2020 14:36:13 +0000 (15:36 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 20 Nov 2020 17:38:56 +0000 (18:38 +0100)
commit06ce84a10079388e95e5959dbcb50fcc563c702b
tree478f2894b787ffd0854a8ed107903dc264aebd3e
parent86c2dd60f1a0b8332a6ffc6e95dca27470fe44f7
BUG/MEDIUM: ssl: error when no certificate are found

When a non-existing file was specified in the configuration, haproxy
does not exits with an error which is not normal.

This bug was introduced by dfa93be ("MEDIUM: ssl: emulate multi-cert
bundles loading in standard loading") which does nothing if the stat
failed.

This patch introduce a "found" variable which is checked at the end of
the function so we exit with an error if no find were found.

Must be backported to 2.3.
src/ssl_sock.c