gpt4 book ai didi

ruby-on-rails - 萨翁 SSL 问题

转载 作者:数据小太阳 更新时间:2023-10-29 07:07:38 26 4
gpt4 key购买 nike

我正在努力让 Savon gem 连接到我们的一台服务器。我不断收到一条错误消息,指出我无法通过 ssl。我已经阅读了许多教程和修复程序,但似乎都没有用。

感谢任何帮助 - 如果我能度过它,这将成为我的星期一 :-)。

错误:

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)

我的代码:

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

最佳答案

Savon 2.x 支持 ssl 全局选项:

Savon.client(ssl_verify_mode: :none)

Savon.client(ssl_version: :SSLv3) 

关于ruby-on-rails - 萨翁 SSL 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6412216/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com