我使用 Savon 2 ruby 进行 soap call。 我的通话代码是:
cert_key_file = <cert_key_file>
cert_key_password = 'xxx'
client = Savon.client do |globals|
globals.log true
globals.wsdl "#{Rails.root}/wsdl/<-wsdl->"
globals.ssl_cert_file cert_key_file
globals.ssl_ca_cert_file cert_key_file
globals.ssl_cert_key_file cert_key_file
globals.ssl_cert_key_password cert_key_password
globals.ssl_verify_mode :none
globals.ssl_version :SSLv3
end
client.call(:function_to_call, message: function_to_call_body(data))
enter code here
证书已从 pfx 文件转换为 pem。 使用带有 pfx 和密码的 SoapUI 调用有效。 使用 Rails 应用程序时出现此错误:
HTTP::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure
有人可以帮助我吗? 谢谢 卡罗
最佳答案
代替
globals.ssl_version :SSLv3
试试 globals.ssl_version :TLSv1
关于ruby - SAVON SOAP sslv3 警报握手失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37730184/