Skip to content

Commit 2af520e

Browse files
authored
Merge pull request #2335 from ekohl/support-ssl-proxy-cipher-suite
Support setting SSLProxyCipherSuite on mod_ssl
2 parents 21ad976 + 4bd6143 commit 2af520e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

manifests/mod/ssl.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
# @param ssl_proxy_protocol
4141
# Configure usable SSL protocol flavors for proxy usage.
4242
#
43+
# @param ssl_proxy_cipher_suite
44+
# Configure usable SSL ciphers for proxy usage. Equivalent to ssl_cipher but for proxy connections.
45+
#
4346
# @param ssl_pass_phrase_dialog
4447
# Type of pass phrase dialog for encrypted private keys.
4548
#
@@ -99,6 +102,7 @@
99102
Variant[Boolean, Enum['on', 'off']] $ssl_honorcipherorder = true,
100103
Array[String] $ssl_protocol = $apache::params::ssl_protocol,
101104
Array $ssl_proxy_protocol = [],
105+
Optional[String[1]] $ssl_proxy_cipher_suite = undef,
102106
String $ssl_pass_phrase_dialog = 'builtin',
103107
Integer $ssl_random_seed_bytes = 512,
104108
String $ssl_sessioncache = $apache::params::ssl_sessioncache,

spec/classes/mod/ssl_spec.rb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,22 @@
1717
it { is_expected.to contain_class('apache::params') }
1818
it { is_expected.to contain_apache__mod('ssl') }
1919
it { is_expected.to contain_package('mod_ssl') }
20-
it { is_expected.to contain_file('ssl.conf').with_path('/etc/httpd/conf.modules.d/ssl.conf') }
21-
it { is_expected.to contain_file('ssl.conf').with_content(%r{SSLProtocol all}) }
20+
it {
21+
is_expected.to contain_file('ssl.conf')
22+
.with_path('/etc/httpd/conf.modules.d/ssl.conf')
23+
.with_content(%r{SSLProtocol all})
24+
.without_content(%r{SSLProxyCipherSuite})
25+
}
26+
27+
context 'with ssl_proxy_cipher_suite' do
28+
let(:params) do
29+
{
30+
ssl_proxy_cipher_suite: 'PROFILE=system',
31+
}
32+
end
33+
34+
it { is_expected.to contain_file('ssl.conf').with_content(%r{SSLProxyCipherSuite PROFILE=system}) }
35+
end
2236
end
2337

2438
context '7 OS with custom directories for PR#1635' do

templates/mod/ssl.conf.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
<% if not @ssl_proxy_protocol.empty? -%>
4545
SSLProxyProtocol <%= @ssl_proxy_protocol.compact.join(' ') %>
4646
<% end -%>
47+
<% if @ssl_proxy_cipher_suite -%>
48+
SSLProxyCipherSuite <%= @ssl_proxy_cipher_suite %>
49+
<% end -%>
4750
<% if @ssl_options -%>
4851
SSLOptions <%= @ssl_options.compact.join(' ') %>
4952
<% end -%>

0 commit comments

Comments
 (0)