From: Rob Biedenharn Date: 2009-02-19T06:57:17+09:00 Subject: Re: HTTPS connection On Feb 18, 2009, at 3:53 PM, Bob Smyph wrote: > Rob Biedenharn wrote: >> On Feb 18, 2009, at 3:17 PM, Bob Smyph wrote: >> >>>> OpenSSL::SSL::SSLError: certificate verify failed >>>> >>>> Or something else? >>>> >>>> -Rob >>>> >>>> Rob Biedenharn http://agileconsultingllc.com >>>> Rob@AgileConsultingLLC.com >>> >>> >>> I get the 'OpenSSL::SSL::SSLError: certificate verify failed' error >> >> >> Does it work with OpenSSL::SSL::VERIFY_NONE >> >> -Rob >> >> Rob Biedenharn http://agileconsultingllc.com >> Rob@AgileConsultingLLC.com > > I think I'm getting pass the connection issues, but I'm not getting > data > back. I should be getting some xml returned but nothing is there. I'm > not sure if you would be able to help on that or is there a different > way to connect then what you have shown above? > -- > Posted via http://www.ruby-forum.com/. > Note, this is real code in my answer. Try putting real code it your follow-up questions, too. irb> google = Net::HTTP.new('google.com',443) => # irb> google.use_ssl = true => true irb> google.verify_mode = OpenSSL::SSL::VERIFY_NONE => 0 irb> resp = google.get "/" => # irb> puts resp.body 302 Moved

302 Moved

The document has moved here. => nil irb> resp.each_header do |name,value| ?> puts "%s : %s"%[name,value] irb> end connection : Close content-type : text/html; charset=UTF-8 date : Wed, 18 Feb 2009 21:52:34 GMT server : GFE/1.3 content-length : 218 location : http://www.google.com => {"connection"=>["Close"], "content-type"=>["text/html; charset=UTF-8"], "date"=>["Wed, 18 Feb 2009 21:52:34 GMT"], "server"=>["GFE/1.3"], "content-length"=>["218"], "location"=>["http://www.google.com "]} Without seeing the code you're trying or the actual response that comes back, I have to just guess. -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com