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

前端 未结 2 1417
青春惊慌失措
青春惊慌失措 2020-12-20 12:09

Variants of this error have been posted all over the place but none of the solutions seem to work for me.

I\'m running ruby 2.2.2p95 (2015-04-13 revision 50295

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 13:01

    This looks like exactly the same problem I've answered in https://stackoverflow.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']
    

提交回复
热议问题