From: Arup Rakshit Date: 2013-01-24T19:39:40+09:00 Subject: Re: Can't connect to securied host by ssl certificate Krzysztof Wawer wrote in post #1093400: > I must connect with some server which need SSL certificates, but I am > not able to write working code, I have: > - CA certificate > - X509 certificate > - Private key > > when I wrote: > > require 'net/https' > https = Net::HTTP.new('host', port) > https.use_ssl = true > https.ca_file = '/../ca.pem' > https.verify_mode = OpenSSL::SSL::VERIFY_PEER > https.verify_depth = 5 > https.cert = OpenSSL::X509::Certificate.new > File.open('/.../cert/cert.crt') > https.key = OpenSSL::PKey::RSA.new File.open('/.../private/key.pem') > https.request_get('/.../test.txt') > I am also having the same issues with 'mechanize' ruby-gem. But I tried huge,But failed. Thus I am adding my name to this list,to have the update how to handle such situations. Thanks -- Posted via http://www.ruby-forum.com/.