当我试图从我的rails应用程序发送推送通知时,我得到了这样的结果。我使用以下命令确保设备令牌和.pem文件有效
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert aps_development.pem -key aps_development.pem
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: tlsv1 alert internal error
from /Library/Ruby/Gems/2.0.0/gems/houston-2.2.3/lib/houston/connection.rb:44:in `connect'
from /Library/Ruby/Gems/2.0.0/gems/houston-2.2.3/lib/houston/connection.rb:44:in `open'
from /Library/Ruby/Gems/2.0.0/gems/houston-2.2.3/lib/houston/connection.rb:19:in `open'
from /Library/Ruby/Gems/2.0.0/gems/houston-2.2.3/lib/houston/client.rb:40:in `push'此错误消息非常模糊,无法弄清楚发生了什么。
发布于 2017-04-09 21:22:16
当你得到这个错误OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: tlsv1 alert internal error,这意味着你的证书有问题。证书已过期或密码可能已过期。
只要更新你的Apple Push Notification证书,你就会变得很棒。
补充说明:openssl命令不能说明太多信息,如果您遇到需要添加-CApath或-CAfile(或将路径传递给ENV )的情况,可能会产生误导。
希望这能有所帮助。我花了将近一周的时间来解决这个问题。
https://stackoverflow.com/questions/40690498
复制相似问题