Class: OpenSSL::SSL::SSLContext

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/monkey_patches.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ SSLContext

Returns a new instance of SSLContext.



257
258
259
260
261
262
263
264
265
266
267
# File 'lib/puppet/util/monkey_patches.rb', line 257

def initialize(*args)
  __original_initialize(*args)
  if bitmask = self.options
    self.options = bitmask | OpenSSL::SSL::OP_NO_SSLv2
  else
    self.options = OpenSSL::SSL::OP_NO_SSLv2
  end
  # These are the default ciphers in recent MRI versions.  See
  # https://github.com/ruby/ruby/blob/v1_9_3_392/ext/openssl/lib/openssl/ssl-internal.rb#L26
  self.ciphers = "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW"
end