Skip to content

Instantly share code, notes, and snippets.

@lloeki
Created December 2, 2014 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloeki/c9c8f20a7e799bee0ba4 to your computer and use it in GitHub Desktop.
Save lloeki/c9c8f20a7e799bee0ba4 to your computer and use it in GitHub Desktop.
Violently disable OpenSSL cert validation (dangerous!)
require 'openssl'
class OpenSSL::SSL::SSLContext
def verify_mode
OpenSSL::SSL::VERIFY_NONE
end
def verify_mode=(_)
@verify_mode = OpenSSL::SSL::VERIFY_NONE
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment