导轨:3.0.5 红宝石:1.9.2 apn_on_rails:0.5.1
突然开始收到异常:来自 apn_on_rails gem 的“sslv3 alert certificate revoked”。但是,通知仍会发送到设备,并且证书有效期至 2013 年。
重现:
- 导轨控制台。
为现有设备之一创建通知。
not1 = APN::Notification.create(:device_id => devices[0].id, :sound => true, :badge => 1, :alert => "测试")
执行
APN::App.send_notifications
。(注意:APN::Notification.send_notifications 根本不发送任何通知,而是调用 APN::App.send_notifications)
预期输出:要发送到设备的通知。没有抛出异常。
实际输出:发送到设备的通知。抛出异常。以下异常的完整堆栈跟踪:
ruby-1.9.2-p0 > APN::App.send_notifications
SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert certificate revoked
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert certificate revoked
from /gems/apn_on_rails-0.5.1/lib/apn_on_rails/libs/connection.rb:59:in `connect'
from /gems/apn_on_rails-0.5.1/lib/apn_on_rails/libs/connection.rb:59:in `open'
from /gems/apn_on_rails-0.5.1/lib/apn_on_rails/libs/connection.rb:23:in `open_for_delivery'
from /gems/apn_on_rails-0.5.1/lib/apn_on_rails/app/models/apn/app.rb:48:in `send_notifications_for_cert'
from /gems/apn_on_rails-0.5.1/lib/apn_on_rails/app/models/apn/app.rb:36:in `send_notifications'