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)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 Nov 2020 13:39:37 +0000 (14:39 +0100)
commit7efbaf127f87419daf94d30847e400f2b6c92eaf
tree71683683b810a74b1f07298e466f28738ae35dad
parentd33241508bfa744c58055c30c8792f40a0557979
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.

(cherry picked from commit 06ce84a10079388e95e5959dbcb50fcc563c702b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/ssl_sock.c