SSL error no idea what to do

Hi guys I have a ruby script I’m attempting to run that must use the SSL
certificate. I have tried running it without the CA certificate and it
runs just fine. However I keep getting the following error `connect’:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed (OpenSSL::SSL::SSLError)

I’m running a Centos 5.8 server with ruby version 1.8.7. Do i need to
have an official SSL certificate installed or need to have a web server
running in order to use the SSL feature? I’m completely lost here. Any
help with greatly be appreciated.

Here’s a debugging guide for these kinds of errors:

http://railsapps.github.io/openssl-certificate-verify-failed.html

There’s any number of things that can go wrong. A code snippet of what
you’re trying to do would help.

require ‘rubygems’
require ‘savon’
require ‘httpclient’
require ‘openssl’

HTTPI.adapter = :httpclient

client = Savon.client do
ssl_ca_cert_file ‘/etc/pki/tls/certs/ca-bundle.crt’
wsdl ‘/TelematchWebservices.wsdl’
end

$xml = IO.read(“test.xml”)

response = client.call(:test)
response.body

is what I’m trying to do and i get the following errors:

unable to get local issuer certificate

`rescue in request’: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (HTTPI::SSLError)

No idea how to proceed. I have tried a few things but nothing is
promising so far.