Skip to content

Instantly share code, notes, and snippets.

@chrise86
Forked from siruguri/gist:66926b42a0c70ef7119e
Last active August 29, 2015 14:20
Show Gist options
  • Save chrise86/84fbb7930a3820e84855 to your computer and use it in GitHub Desktop.
Save chrise86/84fbb7930a3820e84855 to your computer and use it in GitHub Desktop.
# I am doing this because the server admin forgot to
# Renew their certificate!
prev_setting = OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)
# do my connnection thang!
OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
OpenSSL::SSL.const_set(:VERIFY_PEER, prev_setting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment