且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Ruby:SSL_connect SYSCALL 返回=5 errno=0 state=unknown state (OpenSSL::SSL::SSLError)

更新时间:2022-11-06 22:15:58

这看起来和我在 https 中回答的问题完全一样://***.com/a/29611892/3081018.同样的问题:服务器只能做 TLS 1.0 并且只支持 DES-CBC3-SHA 作为密码.在最近的 ruby​​ 版本中,默认情况下不再启用此密码.要连接此密码,请尝试在您的代码中明确指定密码:

This looks like exactly the same problem I've answered in https://***.com/a/29611892/3081018. Same problem: the server can only do TLS 1.0 and only supports DES-CBC3-SHA as cipher. This cipher is no longer enabled by default in recent ruby versions. To connect with this cipher try to specify the cipher explicitly in your code:

http.ssl_version = :TLSv1
http.ciphers = ['DES-CBC3-SHA']