diff --git a/lib/user_agent.rb b/lib/user_agent.rb index 6f3fa0eef..ce4a82095 100644 --- a/lib/user_agent.rb +++ b/lib/user_agent.rb @@ -318,8 +318,10 @@ returns if uri.scheme.match?(/https/i) http.use_ssl = true - # @TODO verify_mode should be configurable - http.verify_mode = OpenSSL::SSL::VERIFY_NONE + + if !options.fetch(:verify_ssl, false) + http.verify_mode = OpenSSL::SSL::VERIFY_NONE + end end http