SSL_connect returned = 1 errno = 0 state = SSLv3读取服务器证书B:证书验证失败 [英] SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
问题描述
我正在使用 Authlogic-Connect 进行第三方登录。在运行适当的迁移后,Twitter / Google / yahoo登录似乎工作正常,但是Facebook登录会抛出异常:
I am using Authlogic-Connect for third party logins. After running appropriate migrations, Twitter/Google/yahoo logins seem to work fine but the facebook login throws exception:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
开发日志显示
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):
app/controllers/users_controller.rb:37:in `update'
请建议..
推荐答案
在尝试使用Jails生成器Rails 3时遇到类似问题
I ran into a similar problem when trying to use the JQuery generator for Rails 3
我解决了这个问题:
-
获取CURL证书颁发机构(CA) 你可以这样做:
-
sudo port install curl-ca-bundle
[如果你正在使用MacPorts] - 或者直接将其拉下来
wget http://curl.haxx.se/ca/cacert.pem
sudo port install curl-ca-bundle
[if you are using MacPorts]- or just pull it down directly
wget http://curl.haxx.se/ca/cacert.pem
执行尝试验证SSL认证的红宝石代码: SSL_CERT_FILE = / opt / local / etc / certs / cacert.pem rails generate jquery:install
。在您的情况下,您要将其设置为服务器选择的环境变量,或者添加如 ENV ['SSL_CERT_FILE'] = /path/to/your/new/cacert.pem
在您的environment.rb文件。
Execute the ruby code that is trying to verify the SSL certification: SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem rails generate jquery:install
. In your case, you want to either set this as an environment variable somewhere the server picks it up or add something like ENV['SSL_CERT_FILE'] = /path/to/your/new/cacert.pem
in your environment.rb file.
您还可以安装CA文件没有尝试过)到操作系统 - 有很长的说明这里 - 这应该工作一个类似的方式,但我还没有尝试过这个个人的。
You can also just install the CA files (I haven't tried this) to the OS -- there are lengthy instructions here -- this should work in a similar fashion, but I have not tried this personally.
基本上,你遇到的问题是一些Web服务正在响应一个与CA签署的证书,OpenSSL无法验证。
Basically, the issue you are hitting is that some web service is responding with a certificate signed against a CA that OpenSSL cannot verify.
这篇关于SSL_connect returned = 1 errno = 0 state = SSLv3读取服务器证书B:证书验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!