[英]Getting Error Apple push notification OpenSSL::SSL::SSLError
[英]Apple Push Notification / Ruby OpenSSL Error
当我尝试从我的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'
此错误消息非常模糊,无法弄清楚发生了什么。
当您收到此错误时OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: tlsv1 alert internal error
它表示您的证书有问题。 证书已过期或密码。
只需更新Apple推送通知证书就可以了。
附加说明:如果您遇到需要添加-CApath
或-CAfile
(或将那些路径传递给ENV)可能会产生误导, openssl
命令并没有说明多少。
希望这有帮助。 我用了差不多一个小时来解决这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.