BUG/MINOR: ssl: remove haproxy SSLv3 support when ssl lib have no SSLv3
authorEmmanuel Hocdet <manu@gandi.net>
Wed, 12 Jul 2017 10:53:02 +0000 (12:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Jul 2017 12:38:12 +0000 (14:38 +0200)
commit23877ab6533e97981edcb3d11bc74ab44b8531aa
treec04e5a960f6e3f2a89e15edb5dabb305f79a555b
parent80ebd30c9648b84495087f8e9c6e4d5f2d602f1f
BUG/MINOR: ssl: remove haproxy SSLv3 support when ssl lib have no SSLv3

The commit 5db33cbd "MEDIUM: ssl: ssl_methods implementation is reworked and
factored for min/max tlsxx" drop the case when ssl lib have removed SSLv3.
The commit 1e59fcc5 "BUG/MINOR: ssl: Be sure that SSLv3 connection methods
exist for openssl < 1.1.0" fix build but it's false because haproxy think
that ssl lib support SSLv3.

SSL_OP_NO_* are flags to set in ssl_options and is the way haproxy do the
link between ssl capabilities and haproxy configuration. (The mapping table
is done via methodVersions). SSL_OP_NO_* is set to 0 when ssl lib doesn't
support a new TLS version. Older version (like SSLv3) can be removed at
build or unsupported (like libressl). In all case OPENSSL_NO_SSL3 is define.

To keep the same logic, this patch alter SSL_OP_NO_SSLv3 to 0 when SSLv3 is
not supported by ssl lib (when OPENSSL_NO_SSL3 is define).
src/ssl_sock.c