Created
September 6, 2012 04:11
-
-
Save mperham/3651105 to your computer and use it in GitHub Desktop.
Campfire's SSL cert doesn't verify with Ruby 1.9.3 p194
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This works for me in 1.9.3-p125 but not in p194. | |
# Can anyone explain why? | |
require 'net/http' | |
http = Net::HTTP.new("theclymb1.campfirenow.com", 443) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
request = Net::HTTP::Get.new("/login") | |
response = http.request(request) | |
raise response.inspect if response.code != '200' |
This fixed the problem, from http://stackoverflow.com/a/11041391/1494519
$ cd $rvm_path/usr/ssl
$ curl -O http://curl.haxx.se/ca/cacert.pem
$ mv cacert.pem cert.pem
Here is what works for me witih macports and rbenv: https://gist.github.com/2315629
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mperharm here is the difference (openssl) p125-p194:
my guess is you could try reverse patch from Bug #6134 -> http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/35167/diff.diff