AdilA
@AdilA
Нравится кодить, изучаю go c echo

Почему появляется ошибка no such engine in OpenSSL::Engine.by_id('kncagost')?

Не могу запустить сервер, все время ошибка хотя все работает нормально и openssl и в rails console все нормально
2015-12-21T05:37:24.470785 #12344] INFO -- : Refreshing Gem list /home/demo/application1/releases/20151221102720/config/initializers/initGost.rb:9:in by_id': no such engine (OpenSSL::Engine::EngineError)
from /home/demo/application1/releases/20151221102720/config/initializers/initGost.rb:9:in' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in load'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:inblock in load' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in load_dependency'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:inload' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in block (2 levels) in '
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:ineach' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in block in '
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:ininstance_exec' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in run'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:inblock in run_initializers' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:226:in block in tsort_each'
from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:348:inblock (2 levels) in each_strongly_connected_component' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:418:in block (2 levels) in each_strongly_connected_component_from'
from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:427:ineach_strongly_connected_component_from' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:417:in block in each_strongly_connected_component_from'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:ineach' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in tsort_each_child'
from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:411:incall' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:411:in each_strongly_connected_component_from'
from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:347:inblock in each_strongly_connected_component' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:345:in each'
from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:345:incall' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:345:in each_strongly_connected_component'
from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:224:intsort_each' from /home/demo/.rvm/rubies/ruby-2.1.2-gost/lib/ruby/2.1.0/tsort.rb:205:in tsort_each'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:inrun_initializers' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in initialize!'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:inmethod_missing' from /home/demo/application1/releases/20151221102720/config/environment.rb:5:in '
from config.ru:4:inrequire' from config.ru:4:in block in '
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/rack-1.5.5/lib/rack/builder.rb:55:ininstance_eval' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in initialize'
from config.ru:1:innew' from config.ru:1:in '
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:ineval' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in block in builder'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn_rails:139:incall' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn_rails:139:in block in rails_builder'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:incall' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in build_app!'
from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:instart' from /home/demo/application1/shared/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn_rails:209:in '
from /home/demo/application1/shared/bundle/ruby/2.1.0/bin/unicorn_rails:23:inload' from /home/demo/application1/shared/bundle/ruby/2.1.0/bin/unicorn_rails:23:in `'
initializers/initGost.rb

require 'openssl'
require 'r509'

OpenSSL::Engine.load
@gost_engine = OpenSSL::Engine.by_id('kncagost')
@gost_engine.set_default(0xFFFF)

Net::HTTP.start("crl.pki.kz") do |http|
    resp = http.get("/crl/Gost0.crl")
    Rails.cache.write("crl", resp.body)
  end
  • Вопрос задан
  • 287 просмотров
Пригласить эксперта
Ответы на вопрос 1
Что возвращает OpenSSL::Engine.engines()?
Может, в списке поддерживаемых нет kncagost?
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы