Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Savon SSL Issue

I'm struggling to get the Savon gem to connect to one of our servers. I keep getting an error stating I can't get past the ssl. I've read numerous tutorials and fixes but none seem to work.

Any help appreciated - this will make my Monday if I can get past it :-).

Error:

D, [2011-06-20T09:43:02.002993 #10328] DEBUG -- : Retrieving WSDL from: http://path_to_wsdl:4443/sm/services/mailing/2009/03/02?wsdl
D, [2011-06-20T09:43:02.129057 #10328] DEBUG -- : HTTPI executes HTTP GET using the httpclient adapter
/.rvm/gems/ruby-1.9.2-p0/gems/httpclient-2.2.1/lib/httpclient/session.rb:276:in `connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert unexpected message (OpenSSL::SSL::SSLError)

My code:

require 'savon'

client = Savon::Client.new "path_to_my_wsdl"

client.http.auth.ssl.cert_file = "path/cert.pem"

client.http.auth.ssl.cert_key_file = "/path/localhost.key"
client.http.auth.ssl.verify_mode = :none

client.wsse.credentials "username", "password"

client.wsdl.soap_actions
like image 388
Northband Avatar asked Jun 20 '11 13:06

Northband


1 Answers

Savon 2.x support ssl global option:

Savon.client(ssl_verify_mode: :none)

and

Savon.client(ssl_version: :SSLv3) 
like image 96
Luca Arcara Avatar answered Sep 21 '22 11:09

Luca Arcara