Closed cmer closed 13 years ago
So the only problem with this is that the OSX path doesn't actually contain any certificates. What kind of testing did you do?
I know, which is odd. But it worked for me. I was able to connect to https://github.com and other https just fine without any errors... Am I missing something?
require 'always_verify_ssl_certificates'
url = URI.parse("https://github.com/")
request = Net::HTTP::Get.new(url.path)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
response = http.start {|http| http.request(request) }
Yeah, but have you tried connecting to a server that's using a self-signed certificate? I'm wondering whether an empty ca_path means that it'll just verify everything. If that's the case, then this gem should check that too.
I didn't try that. I don't have access to such a thing.
The path for OS X seems to be right, but it's definitely odd. See http://cheat.errtheblog.com/s/openssl/. I just found this however:
Mac OSX 10.5 (Leopard) onwards
It is no longer possible to import certificates into Leopard on the command line. Instead, you need to use the Keychain Access application (ask finder for it).
This was fixed by ef5be
Seems to work on Ubuntu and OS X. It's just weird that the OS X directory is empty, but it works... go figure.
Let me know if it works for you... Couldn't test on Red Hat.