BUG/MINOR: ssl: default settings for ssl server options are not used
authorJerome Magnin <jmagnin@haproxy.com>
Wed, 22 Apr 2020 09:40:18 +0000 (11:40 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 22 Apr 2020 13:43:03 +0000 (15:43 +0200)
commit2e8d52f869ed7673a8274ec7b045161e09350251
tree845d578030df8718d0e6f5787b9fa6458730340c
parentc3b7e74455780f8a2fc349d945f83f12a37b317a
BUG/MINOR: ssl: default settings for ssl server options are not used

Documentation states that default settings for ssl server options can be set
using either ssl-default-server-options or default-server directives. In practice,
not all ssl server options can have default values, such as ssl-min-ver, ssl-max-ver,
etc..

This patch adds the missing ssl options in srv_ssl_settings_cpy() and srv_parse_ssl(),
making it possible to write configurations like the following examples, and have them
behave as expected.

   global
     ssl-default-server-options ssl-max-ver TLSv1.2

   defaults
     mode http

   listen l1
     bind 1.2.3.4:80
     default-server ssl verify none
     server s1 1.2.3.5:443

   listen l2
     bind 2.2.3.4:80
     default-server ssl verify none ssl-max-ver TLSv1.3 ssl-min-ver TLSv1.2
     server s1 1.2.3.6:443

This should be backported as far as 1.8.
This fixes issue #595.
src/server.c
src/ssl_sock.c