我正在尝试使用 Faraday 和 Typhoeus 将使用 RestClient::Request.execute 发出的 REST 调用换成并行调用,但 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
我在这里做错了什么?