mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 22:16:19 +02:00
added interface handler
This commit is contained in:
parent
4d33898856
commit
0ba69ea848
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ module Repp
|
|||
api_user_id = p12_params[:api_user_id]
|
||||
render_error(I18n.t('errors.messages.not_found'), :not_found) and return if api_user_id.blank?
|
||||
|
||||
certificate = ::Certificates::CertificateGenerator.new(api_user_id: api_user_id).execute
|
||||
certificate = ::Certificates::CertificateGenerator.new(api_user_id: api_user_id, interface: 'registrar').execute
|
||||
render_success(data: { certificate: certificate })
|
||||
end
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ class Certificate < ApplicationRecord
|
|||
cn = pc.scan(%r{\/CN=(.+)}).flatten.first
|
||||
self.common_name = cn.split('/').first
|
||||
self.md5 = OpenSSL::Digest::MD5.new(origin.to_der).to_s if crt
|
||||
self.interface = crt ? API : REGISTRAR
|
||||
self.interface = crt ? API : REGISTRAR if interface.blank?
|
||||
end
|
||||
|
||||
def create_tempfile(filename, content = '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue