Skip to content

Instantly share code, notes, and snippets.

@andruby
Created October 5, 2011 17:57
Show Gist options
  • Select an option

  • Save andruby/1265160 to your computer and use it in GitHub Desktop.

Select an option

Save andruby/1265160 to your computer and use it in GitHub Desktop.
Force disable net/http ssl certificate validation
# Dirty monkey patch to globally disable certificate validation
# YOU SHOULD NEVER USE THIS
# Except when testing/debugging with self signed certificates
require 'net/http'
module OpenSSL
module SSL
VERIFY_PEER = VERIFY_NONE
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment