{# Copyright (C) 2014-2017 Maciej Delmanowski <drybjed@drybjed.net>
 # Copyright (C) 2015-2017 Robin Schneider <ypid@riseup.net>
 # Copyright (C) 2014-2017 DebOps <https://debops.org/>
 # SPDX-License-Identifier: GPL-3.0-only
 #}
# {{ ansible_managed }}

# Define default SSL configuration options

ssl_protocols               {{ nginx_default_tls_protocols | join(" ") }};
ssl_prefer_server_ciphers   {{ "off"
                               if nginx_default_tls_protocols|length == 1 and
                                  nginx_default_tls_protocols[0] == "TLSv1.3"
                               else "on" }};
ssl_ciphers                 {{ nginx_ssl_ciphers[nginx_default_ssl_ciphers] }};
{% if nginx_ssl_dhparam != '' %}
ssl_dhparam                 {{ nginx_ssl_dhparam }};
{% endif %}
{% if nginx_default_ssl_curve %}
ssl_ecdh_curve              {{ nginx_default_ssl_curve }};
{% endif %}
