0

I am using softlayer_api gem but when i called any method like "getOpenTickets" after

creating SoftLayer::Service object i get this exception:

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):

my code that is executed in dashboard controller is:

def index

begin

  account_service = SoftLayer::Service.new("SoftLayer_Account",

                                           :username => "sl221577473gghg717a",

                                           :api_key => 

"25f38a342079c07f4336543a0fccc54ee8755cb92b53cd78d0hdufh77734747hreghghed4aa1d9961b85")

  account = account_service.getOpenTickets

rescue Exception => exception

  puts "Unable to retrieve account information: #{exception}"

end

end

i also require related libraries as well

require 'rubygems'

require 'softlayer_api'

require 'pp'

require 'openssl'

any opinion will be greatly appreciate

Kashiftufail
  • 10,815
  • 11
  • 45
  • 79

1 Answers1

2

The Reason is that your SSL verification is failed.So please find where softlayer_api gem is

installed and go to service.rb and find the line below.

https.verify_mode = OpenSSL::SSL::VERIFY_NONE  if $DEBUG

and replace it with

https.verify_mode = OpenSSL::SSL::VERIFY_NONE

Start server and check!