Skip to content

Commit e79be53

Browse files
committed
Do not explicitly disable SSLv3
SSLv3 is long gone, we could also probably also disable TLS 1.0 and 1.1, but [recent changes in the openssl gem freeze the default parameters](ruby/openssl#925), and the default configuration seems to have the correct behavior on the systems I tested, refusing to connect to hosts with anything older than TLS 1.2. Drop this monkey patching to unbreak with version 4.0.0 of the openssl gem. Fixes OpenVoxProject/openbolt#169
1 parent e49895c commit e79be53

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

lib/puppet/util/monkey_patches.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ def self.exists?(file_name)
5252
require_relative '../../puppet/ssl/openssl_loader'
5353
unless Puppet::Util::Platform.jruby_fips?
5454
class OpenSSL::SSL::SSLContext
55-
if DEFAULT_PARAMS[:options]
56-
DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv3
57-
else
58-
DEFAULT_PARAMS[:options] = OpenSSL::SSL::OP_NO_SSLv3
59-
end
60-
6155
alias __original_initialize initialize
6256
private :__original_initialize
6357

spec/unit/util/monkey_patches_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,6 @@
7171
end
7272

7373
describe OpenSSL::SSL::SSLContext do
74-
it 'disables SSLv3 via the SSLContext#options bitmask' do
75-
expect(subject.options & OpenSSL::SSL::OP_NO_SSLv3).to eq(OpenSSL::SSL::OP_NO_SSLv3)
76-
end
77-
78-
it 'does not exclude SSLv3 ciphers shared with TLSv1' do
79-
cipher_str = OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ciphers]
80-
if cipher_str
81-
expect(cipher_str.split(':')).not_to include('!SSLv3')
82-
end
83-
end
84-
8574
it 'sets parameters on initialization' do
8675
expect_any_instance_of(described_class).to receive(:set_params)
8776
subject

0 commit comments

Comments
 (0)