Project

General

Profile

Bug #9858 » fix_9858_monkey.diff

monkey patch for older versions - Marek Hulán, 03/23/2015 11:27 AM

View differences:

config/application.rb
require File.expand_path('../../lib/timed_cached_store.rb', __FILE__)
require File.expand_path('../../lib/foreman/exception', __FILE__)
require File.expand_path('../../lib/core_extensions', __FILE__)
require File.expand_path('../../lib/ssl_context_monkey_patch', __FILE__)
if SETTINGS[:support_jsonp]
if File.exist?(File.expand_path('../../Gemfile.in', __FILE__))
lib/ssl_context_monkey_patch.rb
require 'openssl'
# we need to enforce verify_mode => 1 on SSL context
# more info in http://projects.theforeman.org/issues/9858
class OpenSSL::SSL::SSLContext
alias __original_initialize initialize
private :__original_initialize
def initialize(*args)
__original_initialize(*args)
params = {
:options => DEFAULT_PARAMS[:options],
}
set_params(params)
end
end
(2-2/2)