[英]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.