Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #8441 - Can specify cdn ssl version via config #4823

Merged
merged 1 commit into from
Nov 18, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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