D
D
dexdev2015-12-21 13:53:17
OpenSSL
dexdev, 2015-12-21 13:53:17

Why does the no such engine in OpenSSL::Engine.by_id('kncagost') error appear?

Can't start server, error all the time even though everything works fine in both openssl and rails console everything is
fine 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

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2015-12-21
@2ord

What does it return OpenSSL::Engine.engines()?
Maybe kncagost is not in the supported list?

A
Andrew Shmelyov, 2016-12-01
@Sher-Khan

Were you able to solve the problem? Faced the same

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question