问题描述
我正在尝试将使用 RestClient::Request.execute 发出的 REST 调用替换为使用 Faraday 和 Typhoeus 的并行调用,但 ETHON 报告 return_code=ssl_certproblem
当前代码
RestClient::Request.execute(
...
ssl_client_key: OpenSSL::PKey::RSA.new(private_key),ssl_client_cert: OpenSSL::X509::Certificate.new(identity_certificate),ssl_ca_path: ca_certificate_file_path
)
新代码
ssl_options = Hash.new
ssl_options[:client_key] = OpenSSL::PKey::RSA.new(private_key)
ssl_options[:client_cert] = OpenSSL::X509::Certificate.new(identity_certificate)
ssl_options[:ca_path] = ca_certificate_file_path
Faraday::Connection.new(url,options={
:ssl => ssl_options
}) do |builder|
builder.adapter :typhoeus
end
我在这里做错了什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)