Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > HttpClienbt SSL Errors - OS Specific (RHEL 4 versus CentOS 5.4)

Reply
Thread Tools

HttpClienbt SSL Errors - OS Specific (RHEL 4 versus CentOS 5.4)

 
 
Mike Papper
Guest
Posts: n/a
 
      03-29-2011
Hi, Im looking for help using HttpClient with Ruby on Rails. Heres our
environment:

Red Hat Enterprise Linux ES release 4 (Nahant Update 4) OR Cent OS 5.4
openssl version: OpenSSL 0.9.8e 23 Feb 2007 or OpenSSL 0.9.8e-fips-rhel5
01 Jul 2008 or OpenSSL 0.9.7a Feb 19 2003
ruby: 1.8.6 or 1.8.7
httpclient ruby gem: httpclient 2.1.5.2

On the RHEL4 based machines (with openssl of 0.9.7 OR 0.9. I get one
of these 2 errors 9whereas the same code on CentOS works):

1) cacerts loading failed
at depth 1 - 20: unable to get local issuer certificate
OpenSSL::SSL::SSLError: certificate verify failed
from
/usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in
`connect'

OR

2) cacerts loading failed
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed
from
/usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in
`connect'

I thought that upgrading SSL would fix the RHEL4 servers but thats not
the case.


Anyone have an idea of what other packages or libraries I need to
upgrade on RHEL4 to make these errors go away?

Any input is appreciated, thanks,

Mike

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Brian Candler
Guest
Posts: n/a
 
      03-29-2011
Mike Papper wrote in post #989708:
> On the RHEL4 based machines (with openssl of 0.9.7 OR 0.9. I get one
> of these 2 errors 9whereas the same code on CentOS works):
>
> 1) cacerts loading failed
> at depth 1 - 20: unable to get local issuer certificate


This means it can't find a root certificate with which to verify the
site certificate.

To start with, forget about ruby. Make it verify using the openssl
command line tool:

openssl s_client -connect my.server.name:443 # should not verify

openssl s_client -connect my.server.name:443 -CApath /path/to/certs

where /path/to/certs is whatever directory contains your collection of
root certificates; I don't know what it is for RHEL4, but googling
suggests this:

http://www.linux-archive.org/centos/...ssl-where.html

When you get "verify return code 0" then you know everything is working.

Then you just need to pass the correct option to ruby so it can find the
CA directory. For example, with Net::HTTP it would be
:ca_path=>"/path/to/certs"

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERRORs trying to install ruby-ldap on CentOS Xeno Campanoli Ruby 7 12-29-2009 09:25 PM
Re: Mozilla versus IE versus Opera versus Safari Peter Potamus the Purple Hippo Firefox 0 05-08-2008 12:56 PM
equal? versus eql? versus == versus === verus <=> Paul Butcher Ruby 12 11-28-2007 06:06 AM
Errors, errors, errors Mark Goldin ASP .Net 2 01-17-2004 08:05 PM
HTML Client Control versus. HTML Server Control versus. Web Server Control Matthew Louden ASP .Net 1 10-11-2003 07:09 PM



Advertisments