Skip to content
Snippets Groups Projects
Commit 8da806db authored by Derek Lindahl's avatar Derek Lindahl
Browse files

Merge pull request #4 from dynaum/master

Configuring ssl certs path for ubuntu
parents 79a06b06 386194b0
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,10 @@ module OmniAuth ...@@ -78,7 +78,10 @@ module OmniAuth
result = '' result = ''
http = Net::HTTP.new(@uri.host, @uri.port) http = Net::HTTP.new(@uri.host, @uri.port)
http.use_ssl = @uri.port == 443 || @uri.instance_of?(URI::HTTPS) http.use_ssl = @uri.port == 443 || @uri.instance_of?(URI::HTTPS)
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl? && @options.disable_ssl_verification? if http.use_ssl?
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @options.disable_ssl_verification?
http.ca_path = '/etc/ssl/certs' if File.exists? '/etc/ssl/certs' # ruby19 ubuntu
end
http.start do |c| http.start do |c|
response = c.get "#{@uri.path}?#{@uri.query}", VALIDATION_REQUEST_HEADERS.dup response = c.get "#{@uri.path}?#{@uri.query}", VALIDATION_REQUEST_HEADERS.dup
result = response.body result = response.body
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment