[英]Ruby 2.5.1, Rails 5.1.6, HTTParty post returns OpenSSL error
我正在运行一个控制台实用程序,我尝试过经过验证的:false,只是在运行此命令时确定它是客户端还是服务器问题:
Given the information in the comments I seems that the client and the server can't negotiate which cryptographic protocol to use. 鉴于注释中的信息,我似乎客户端和服务器无法协商使用哪种加密协议。
In order to fix this you might need to do one of the following things: 为了解决此问题,您可能需要执行以下操作之一:
You can try to use specific ssl version on the request: 您可以尝试在请求中使用特定的ssl版本:
HTTParty.post(url, body: payload.to_json, ssl_version: :TLSv1)
You can find all supported :ssl_versions
values by using OpenSSL::SSL::SSLContext::METHODS
in the rails console and try to use some of them. 您可以通过在Rails控制台中使用OpenSSL::SSL::SSLContext::METHODS
找到所有受支持的:ssl_versions
值,并尝试使用其中的一些。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.