如何摆脱OpenSSL :: SSL :: SSLError [英] How to get rid of OpenSSL::SSL::SSLError

查看:150
本文介绍了如何摆脱OpenSSL :: SSL :: SSLError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OmniAuth对Facebook进行身份验证。最初,它是工作,但一路上它只是停止工作,并开始给我这个错误信息:

I am trying to authenticate users with Facebook using OmniAuth. Initially, it was working, but along the way it just stopped working and started to give me this error message:


OpenSSL :: SSL: :SSLError SSL_connect
返回= 1 errno = 0 state = SSLv3读取
服务器证书B:证书
验证失败

OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

相同的代码对Twitter很好,我似乎不明白为什么它不适用于Facebook。我已经在网上寻求帮助,但我没有成功。

The same code works well for Twitter and I can't seem to understand why it doesn't work for Facebook. I have looked online for help, but I haven't been successful.

这是我正在建立的网站的链接: http://www.bestizz .com /

这个网址会给你一个错误信息: http:// www。 bestizz.com/auth/facebook

This is the link to the website I am building: http://www.bestizz.com/
And this url would give you the error message: http://www.bestizz.com/auth/facebook

推荐答案

Ruby找不到任何根证书。这是一个用于调试的选项。在脚本的开始处放置以下代码:

Ruby cannot find any root certificates. Here is an option for debugging purposes. Put following code at the begining of your script:

   require 'openssl'
   OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

这篇关于如何摆脱OpenSSL :: SSL :: SSLError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆