Skip to content

Commit 35a3e3e

Browse files
committed
allow vhost parameter ssl_honorcipherorder to take a boolean as well as on/off (fixes MODULES-11068)
1 parent 249ade1 commit 35a3e3e

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

manifests/vhost.pp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@
17651765
$ssl_certs_dir = $apache::params::ssl_certs_dir,
17661766
$ssl_protocol = undef,
17671767
$ssl_cipher = undef,
1768-
$ssl_honorcipherorder = undef,
1768+
Variant[Boolean, Enum['on', 'On', 'off', 'Off'], Undef] $ssl_honorcipherorder = undef,
17691769
Optional[Enum['none', 'optional', 'require', 'optional_no_ca']] $ssl_verify_client = undef,
17701770
$ssl_verify_depth = undef,
17711771
Optional[Enum['none', 'optional', 'require', 'optional_no_ca']] $ssl_proxy_verify = undef,
@@ -2029,6 +2029,18 @@
20292029
include apache::mod::mime
20302030
}
20312031

2032+
if $ssl_honorcipherorder =~ Boolean or $ssl_honorcipherorder == undef {
2033+
$_ssl_honorcipherorder = $ssl_honorcipherorder
2034+
} else {
2035+
$_ssl_honorcipherorder = $ssl_honorcipherorder ? {
2036+
'on' => true,
2037+
'On' => true,
2038+
'off' => false,
2039+
'Off' => false,
2040+
default => true,
2041+
}
2042+
}
2043+
20322044
if $auth_kerb and $ensure == 'present' {
20332045
include apache::mod::auth_kerb
20342046
}
@@ -2680,7 +2692,7 @@
26802692
# - $ssl_crl_check
26812693
# - $ssl_protocol
26822694
# - $ssl_cipher
2683-
# - $ssl_honorcipherorder
2695+
# - $_ssl_honorcipherorder
26842696
# - $ssl_verify_client
26852697
# - $ssl_verify_depth
26862698
# - $ssl_options

templates/vhost/_ssl.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<%- if @ssl_cipher -%>
1616
SSLCipherSuite <%= @ssl_cipher %>
1717
<%- end -%>
18-
<%- if @ssl_honorcipherorder -%>
19-
SSLHonorCipherOrder <%= @ssl_honorcipherorder %>
18+
<%- if not @ssl_honorcipherorder.nil? -%>
19+
SSLHonorCipherOrder <%= scope.call_function('apache::bool2httpd', [@_ssl_honorcipherorder]) %>
2020
<%- end -%>
2121
<%- if @ssl_verify_client -%>
2222
SSLVerifyClient <%= @ssl_verify_client %>

0 commit comments

Comments
 (0)