rpush openssl密码错误

时间:2018-01-12 03:56:37

标签: ruby ruby-on-rails-4 openssl

使用rpush通过APNS发送推送(apple-app) 我收到如下错误。似乎错误是由于ruby更新的问题,(2.4.0)但是,我不确定为什么这个密码长度问题有 发生了以及如何处理这个问题。

OpenSSL::OpenSSLError, password must be at least 4 bytes
/home/deploy/project/shared/bundle/ruby/2.4.0/gems/rpush-3.0.2/lib/rpush/daemon/tcp_connection.rb:128:in `initialize'
/home/deploy/project/shared/bundle/ruby/2.4.0/gems/rpush-3.0.2/lib/rpush/daemon/tcp_connection.rb:128:in `new'
/home/deploy/project/shared/bundle/ruby/2.4.0/gems/rpush-3.0.2/lib/rpush/daemon/tcp_connection.rb:128:in `setup_ssl_context'
/home/deploy/project/shared/bundle/ruby/2.4.0/gems/rpush-3.0.2/lib/rpush/daemon/tcp_connection.rb:39:in `connect'
/home/deploy/project/shared/bundle/ruby/2.4.0/gems/rpush-3.0.2/lib/rpush/daemon/apns/feedback_receiver.rb:57:in `check_for_feedback'

当前版本的openssl如下所示

2.4.0 :001 > require 'openssl'
 => true
2.4.0 :002 > RUBY_VERSION
 => "2.4.0"
2.4.0 :003 > OpenSSL::OPENSSL_VERSION
 => "OpenSSL 1.0.2g  1 Mar 2016"
2.4.0 :004 > OpenSSL::VERSION
 => "2.0.2"
2.4.0 :005 >

1 个答案:

答案 0 :(得分:0)

将您的openssl gem版本升级为2.0.5。已删除4个字节的限制here