gpt4 book ai didi

ruby - 使用 soap4r 时 sslv3 警告意外消息

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

我正在使用 level3 SOAP API。直到最近更新 OpenSSL 时,一切都运行良好。

这是错误消息的完整输出:

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert unexpected message):
httpclient (2.1.5.2) lib/httpclient/session.rb:247:in `connect'
httpclient (2.1.5.2) lib/httpclient/session.rb:247:in `ssl_connect'
httpclient (2.1.5.2) lib/httpclient/session.rb:639:in `connect'
httpclient (2.1.5.2) lib/httpclient/timeout.rb:128:in `timeout'
httpclient (2.1.5.2) lib/httpclient/session.rb:631:in `connect'
httpclient (2.1.5.2) lib/httpclient/session.rb:522:in `query'
httpclient (2.1.5.2) lib/httpclient/session.rb:147:in `query'
httpclient (2.1.5.2) lib/httpclient.rb:953:in `do_get_block'
httpclient (2.1.5.2) lib/httpclient.rb:765:in `do_request'
httpclient (2.1.5.2) lib/httpclient.rb:848:in `protect_keep_alive_disconnected'
httpclient (2.1.5.2) lib/httpclient.rb:764:in `do_request'
httpclient (2.1.5.2) lib/httpclient.rb:666:in `request'
httpclient (2.1.5.2) lib/httpclient.rb:596:in `post'
/Users/glanotte/.rvm/gems/ruby-1.8.7-p302/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:238:in `send_post'
/Users/glanotte/.rvm/gems/ruby-1.8.7-p302/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:172:in `send'
/Users/glanotte/.rvm/gems/ruby-1.8.7-p302/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:179:in `route'
/Users/glanotte/.rvm/gems/ruby-1.8.7-p302/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:143:in `call'
/Users/glanotte/.rvm/gems/ruby-1.8.7-p302/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:181:in `call'
(eval):6:in `validateSLServiceAvailability'

该错误与此处报告的错误非常相似:

http://dev.ctor.org/http-access2/ticket/223

打开上面的人的解决方案是“我通过将 SSL::OP_NO_TICKET 作为 SSLConfig 的选项传递来解决这个问题。”我试图通过以下方式做到这一点:

object = WsdlToRubyPortType.new
object.options['client.protocol.http.ssl_config.options'] = OpenSSL::SSL::OP_NO_TICKET

我也尝试过以下方法:

object.options['client.protocol.http.ssl_config.options'] = "OpenSSL::SSL::OP_NO_TICKET"
object.options['client.protocol.http.ssl_config.options'] = "SSL::OP_NO_TICKET"

结果相同,错误消息仍然存在。我尝试在 soap/property 文件中添加一行,但它不被 httpconfigloader 识别为有效选项。

任何帮助将不胜感激,我完全被困住了。我觉得答案很明显,但看不到。

最佳答案

您需要在 HTTP 实例上设置配置:

http = HTTPClient.new
http.ssl_config.options = OpenSSL::SSL::OP_NO_TICKET

关于ruby - 使用 soap4r 时 sslv3 警告意外消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4435302/

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