[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

OpenSSL Ruby 1.9? "Certificate verify failed"

Alexandre Alex

1/24/2009 6:56:00 AM

Hi Guys!

I'm trying to use OpenSSL with Ruby 1.9.1 but each time it tells me
"SSLv3 read server certificate B: certificate verify failed
(OpenSSL::SSL::SSLError)".

Also, I had to copy ssleay32.dll and libeay32.dll else it wouldn't have
"worked"..

Here's the ruby code:

require 'net/https'
require 'uri'

uri = URI.parse(ARGV[0] || 'https://gmail...)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == "https" # enable SSL/TLS
http.start {
http.request_get(uri.path) {|res|
print res.body
}
}

Nothing complex, I just don't understand WHY it doesn't work?! If
someone could help me, I'd be verry happy, I really don't know what to
do...
--
Posted via http://www.ruby-....

3 Answers

Ryan Davis

1/24/2009 9:33:00 AM

0


On Jan 23, 2009, at 22:56 , Alexandre Alex wrote:

> I'm trying to use OpenSSL with Ruby 1.9.1 but each time it tells me
> "SSLv3 read server certificate B: certificate verify failed
> (OpenSSL::SSL::SSLError)".

I've forwarded this with additional verification that windows is not
playing part to ruby-core@.


Alexandre Alex

1/24/2009 3:47:00 PM

0

Ryan Davis wrote:
> On Jan 23, 2009, at 22:56 , Alexandre Alex wrote:
>
>> I'm trying to use OpenSSL with Ruby 1.9.1 but each time it tells me
>> "SSLv3 read server certificate B: certificate verify failed
>> (OpenSSL::SSL::SSLError)".
>
> I've forwarded this with additional verification that windows is not
> playing part to ruby-core@.

But then, if the certificate verification is stricter in Ruby 1.9, how
do I do to make it works?

Thank you very much!
--
Posted via http://www.ruby-....

Fernando Perez

1/24/2009 10:12:00 PM

0

Alexandre Alex wrote:
> Hi Guys!
>
> I'm trying to use OpenSSL with Ruby 1.9.1 but each time it tells me
> "SSLv3 read server certificate B: certificate verify failed
> (OpenSSL::SSL::SSLError)".
>
Add the following, just next to http.use_ssl:

http.verify_mode = OpenSSL::SSL::VERIFY_NONE


--
Training screencasts in french: http://www.d...
--
Posted via http://www.ruby-....