OpenSSL::SSL::SSLError Ubuntu 12.04 only

巧了我就是萌 提交于 2019-12-21 05:40:07

问题


I am using Evernote Ruby API to develop a web application(using rails and oauth). But while running the application in Ubuntu 12.04 I am getting an error "SSL_connect SYSCALL returned=5 errno=0 state=unknown state." This happens only in ubuntu 12.04. Ubuntu versions < 12.04 doesnt have this problem.


回答1:


What is your current SSL_Cert_file environmental variable set to? Try setting the SSL_Cert_file environmental variable to:

export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

If that doesn't work and you are using RVM maybe setting the path to: ~/.rvm/usr/ssl/cert.pem

Before you make any changes just note down what the path currently is so that you can set it back if needed.




回答2:


This issue is being caused by a known bug in Ubuntu openssl 1.0.1:

https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/965371

https://serverfault.com/questions/389197/ssl-routinesssl23-writessl-handshake-failure

Unfortunately, there's a lot of fingerpointing going on and no fixes. If you're running Ruby 1.9 you can force the SSL version to either TLSv1 or SSLv3 to fix it (the problem is with TLSv1.1):

Ruby SSL error - sslv3 alert unexpected message



来源:https://stackoverflow.com/questions/10847779/opensslsslsslerror-ubuntu-12-04-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!