Skip to content

Commit 6bd8126

Browse files
author
sanfrancrisko
authored
Merge pull request #2147 from DavidS/MODULES-11068-fixssl-honorcipherorder
(MODULES-11068) verify ssl_honorcipherorder behaviour
2 parents 56541a3 + 02976d2 commit 6bd8126

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

spec/classes/mod/ssl_spec.rb

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,51 @@
285285

286286
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLProxyProtocol -ALL \+TLSv1$}) }
287287
end
288+
289+
context 'setting ssl_honorcipherorder' do
290+
context 'default value' do
291+
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLHonorCipherOrder On$}) }
292+
end
293+
294+
context 'force on' do
295+
let :params do
296+
{
297+
ssl_honorcipherorder: true,
298+
}
299+
end
300+
301+
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLHonorCipherOrder On$}) }
302+
end
303+
304+
context 'force off' do
305+
let :params do
306+
{
307+
ssl_honorcipherorder: false,
308+
}
309+
end
310+
311+
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLHonorCipherOrder Off$}) }
312+
end
313+
314+
context 'set on' do
315+
let :params do
316+
{
317+
ssl_honorcipherorder: 'on',
318+
}
319+
end
320+
321+
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLHonorCipherOrder On$}) }
322+
end
323+
324+
context 'set off' do
325+
let :params do
326+
{
327+
ssl_honorcipherorder: 'off',
328+
}
329+
end
330+
331+
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLHonorCipherOrder Off$}) }
332+
end
333+
end
288334
end
289335
end

spec/defines/vhost_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,11 @@
10481048
content: %r{^\s+SSLOpenSSLConfCmd\s+DHParameters "foo.pem"$},
10491049
)
10501050
}
1051+
it {
1052+
is_expected.to contain_concat__fragment('rspec.example.com-ssl').with(
1053+
content: %r{^\s+SSLHonorCipherOrder\s+Off$},
1054+
)
1055+
}
10511056
it {
10521057
is_expected.to contain_concat__fragment('rspec.example.com-ssl').with(
10531058
content: %r{^\s+SSLUserName\s+SSL_CLIENT_S_DN_CN$},

0 commit comments

Comments
 (0)