MINOR: ssl: allow to start without certificate if strict-sni is set
authorEmmanuel Hocdet <manu@gandi.net>
Wed, 9 Aug 2017 09:24:25 +0000 (11:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Aug 2017 14:30:28 +0000 (16:30 +0200)
commitaa0d6372922882f58b54f851dfd7ca1f5a71b26d
tree8b90a63ca792d42d9d23c3ea08214dc7a9e0d778
parent3169471964fdc49963e63f68c1fd88686821a0c4
MINOR: ssl: allow to start without certificate if strict-sni is set

With strict-sni, ssl connection will fail if no certificate match. Have no
certificate in bind line, fail on all ssl connections. It's ok with the
behavior of strict-sni. When 'generate-certificates' is set 'strict-sni' is
never used. When 'strict-sni' is set, default_ctx is never used. Allow to start
without certificate only in this case.

Use case is to start haproxy with ssl before customer start to use certificates.
Typically with 'crt' on a empty directory and 'strict-sni' parameters.
src/ssl_sock.c