Skip to content

Instantly share code, notes, and snippets.

@vladzloteanu
Created March 8, 2012 10:48
Show Gist options
  • Save vladzloteanu/2000372 to your computer and use it in GitHub Desktop.
Save vladzloteanu/2000372 to your computer and use it in GitHub Desktop.
OSX Lion: SSL verification issue: Reinstall Ruby with OpenSSL support (with rvm)
# Bug report: http://www.ruby-forum.com/topic/208026
#
## Reproduce bug
require 'socket'
require 'openssl' # Should return true
s = TCPSocket.new 'bugzilla.redhat.com', 443
ctx = OpenSSL::SSL::SSLContext.new
ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
s = OpenSSL::SSL::SSLSocket.new s, ctx
s.connect # Should throw OpenSSL::SSL::SSLError
#
## Reinstall ruby with openssl support
rvm pkg install openssl
rvm reinstall ree-1.8.7-2012.02 -C --with-openssl-dir=$HOME/.rvm/usr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment