Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created May 31, 2009 15:21
Show Gist options
  • Select an option

  • Save bryanl/120917 to your computer and use it in GitHub Desktop.

Select an option

Save bryanl/120917 to your computer and use it in GitHub Desktop.
# from lib/ruby/1.8/open-uri.rb at around line 230
# this only breaks on my mac
http = klass.new(target_host, target_port)
if target.class == URI::HTTPS
require 'net/https'
http.use_ssl = true
# commented this out because we aren't going to verify due
# to the bus error
#http.verify_mode = OpenSSL::SSL::VERIFY_PEER
# added because we aren't going to verify
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
# commented out because this causes the bus error
#store = OpenSSL::X509::Store.new
#store.set_default_paths
#http.cert_store = store
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment