【问题标题】:OpenSSL::SSL::SSLError when GCM.send_notificationGCM.send_notification 时出现 OpenSSL::SSL::SSLError
【发布时间】:2015-12-24 16:28:13
【问题描述】:

我正在使用 GCM gem 向 Android 设备发送推送通知。在生产服务器中,通知发送完美,但是当我尝试在本地发送推送通知时,我收到以下错误:

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

请注意,GCM API KEY 使用与生产服务器相同的密钥设置,并且我使用与生产服务器相同的 send_notification 参数。我还将我的本地 IP 地址添加到 Google Developer Console project credentials(每日更新)。

我错过了什么?

注意:使用RoR v3.2.13Ruby v2.0.0OSx El Capitan,我已经安装了openssl v1.0.2a-1

【问题讨论】:

  • 这可能与this 重复。

标签: ruby-on-rails openssl google-cloud-messaging


【解决方案1】:

好的,问题是我没有安装curl-ca-bundle,就像许多类似的问题一样。当我尝试使用brew 安装curl-ca-bundle 时,我发现package was removed。经过一番研究,我可以在我的 Mac 上安装 ca-cert following this steps.

希望这对将来的人有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-30
    • 2014-06-17
    • 2011-08-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多