Skip to content

Commit

Permalink
Fixes #8441 - Can specify cdn ssl version via config
Browse files Browse the repository at this point in the history
One can now specify the ssl version used to connect to the cdn
  • Loading branch information
parthaa committed Nov 18, 2014
1 parent efc0980 commit 280a77f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/lib/katello/resources/cdn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ def initialize(url, options = {})
@net.key = options[:ssl_client_key]
@net.ca_file = options[:ssl_ca_file]

# NOTE: This was added because some proxies dont support SSLv23 and do not handle TLS 1.2
# Valid values in ruby 1.9.3 are 'SSLv23' or 'TLSV1'
# Run the following command in rails console to figure out other
# valid constants in other ruby versions
# "OpenSSL::SSL::SSLContext::METHODS"
@net.ssl_version = Katello.config.cdn_ssl_version if Katello.config.key?(:cdn_ssl_version)

if (options[:verify_ssl] == false) || (options[:verify_ssl] == OpenSSL::SSL::VERIFY_NONE)
@net.verify_mode = OpenSSL::SSL::VERIFY_NONE
elsif options[:verify_ssl].is_a? Integer
Expand Down

0 comments on commit 280a77f

Please sign in to comment.