BUG/MINOR: ssl: abort on sni allocation failure

The ssl_sock_add_cert_sni() function never return an error when a
sni_ctx allocation fail. It silently ignores the problem and continues
to try to allocate other snis.

It is unlikely that a sni allocation will succeed after one failure and
start a configuration without all the snis. But to avoid any problem we
return a -1 upon an sni allocation error and stop the configuration
parsing.

This patch must be backported in every version supporting the crt-list
sni filters. (as far as 1.5)

(cherry picked from commit fe49bb3d0c046628d67d57da15a7034cc2230432)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
[Cf: slightly adapted for 2.0]
1 file changed