net/haproxy: ignore incompatible options when LibreSSL is used, refs #2013

This commit is contained in:
Frank Wall
2021-03-29 00:02:27 +02:00
parent 2faa645086
commit 095740ab39
2 changed files with 14 additions and 1 deletions
@@ -926,7 +926,11 @@ global
ssl-default-bind-ciphers {{ OPNsense.HAProxy.general.tuning.ssl_cipherList }}
{% endif %}
{% if OPNsense.HAProxy.general.tuning.ssl_cipherSuites|default("") != "" %}
{% if helpers.exists('system.firmware.flavour') and not(helpers.empty('system.firmware.flavour')) and system.firmware.flavour|default('') == 'libressl' %}
# WARNING: ssl-default-bind-ciphersuites cannot be used with flavour {{ system.firmware.flavour}}.
{% else %}
ssl-default-bind-ciphersuites {{ OPNsense.HAProxy.general.tuning.ssl_cipherSuites }}
{% endif %}
{% endif %}
{% endif %}
{# # pass-through options #}
@@ -1162,7 +1166,11 @@ frontend {{frontend.name}}
{% do ssl_options.append('ciphers ' ~ frontend.ssl_cipherList) %}
{% endif %}
{% if frontend.ssl_cipherSuites|default("") != "" %}
{% do ssl_options.append('ciphersuites ' ~ frontend.ssl_cipherSuites) %}
{% if helpers.exists('system.firmware.flavour') and not(helpers.empty('system.firmware.flavour')) and system.firmware.flavour|default('') == 'libressl' %}
# WARNING: ciphersuites cannot be used with flavour {{ system.firmware.flavour}}.
{% else %}
{% do ssl_options.append('ciphersuites ' ~ frontend.ssl_cipherSuites) %}
{% endif %}
{% endif %}
{# # HSTS #}
{% if frontend.ssl_hstsEnabled|default("") == '1' and frontend.mode == 'http' %}