mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Generate DS only with KSK
This commit is contained in:
parent
1e47f3e41c
commit
fb9542502e
3 changed files with 7 additions and 4 deletions
|
@ -19,7 +19,7 @@ class Dnskey < ActiveRecord::Base
|
||||||
|
|
||||||
ALGORITHMS = %w(3 5 6 7 8 252 253 254 255)
|
ALGORITHMS = %w(3 5 6 7 8 252 253 254 255)
|
||||||
PROTOCOLS = %w(3)
|
PROTOCOLS = %w(3)
|
||||||
FLAGS = %w(0 256 257)
|
FLAGS = %w(0 256 257) # 256 = ZSK, 257 = KSK
|
||||||
|
|
||||||
def epp_code_map
|
def epp_code_map
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,7 @@ class Dnskey < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_digest
|
def generate_digest
|
||||||
|
return if flags != 257 # generate ds only with KSK
|
||||||
flags_hex = self.class.int_to_hex(flags)
|
flags_hex = self.class.int_to_hex(flags)
|
||||||
protocol_hex = self.class.int_to_hex(protocol)
|
protocol_hex = self.class.int_to_hex(protocol)
|
||||||
alg_hex = self.class.int_to_hex(alg)
|
alg_hex = self.class.int_to_hex(alg)
|
||||||
|
@ -85,6 +86,7 @@ class Dnskey < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_ds_key_tag
|
def generate_ds_key_tag
|
||||||
|
return if flags != 257 # generate ds key tag only with KSK
|
||||||
pk = public_key.gsub(' ', '')
|
pk = public_key.gsub(' ', '')
|
||||||
wire_format = [flags, protocol, alg].pack('S!>CC')
|
wire_format = [flags, protocol, alg].pack('S!>CC')
|
||||||
wire_format += Base64.decode64(pk)
|
wire_format += Base64.decode64(pk)
|
||||||
|
|
|
@ -14,9 +14,10 @@
|
||||||
.panel-body
|
.panel-body
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-3.control-label
|
.col-md-3.control-label
|
||||||
= label_tag 'domain[legal_document]', t('legal_document'), class: 'required'
|
- c, fr = 'required', true if params[:domain_name].blank?
|
||||||
|
= label_tag 'domain[legal_document]', t('legal_document'), class: c
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= file_field_tag 'domain[legal_document]', required: true
|
= file_field_tag 'domain[legal_document]', required: fr
|
||||||
.col-md-4
|
.col-md-4
|
||||||
%p.domain-general-help= t(:domain_general_help).html_safe
|
%p.domain-general-help= t(:domain_general_help).html_safe
|
||||||
%p.domain-admin-contact-help= t(:domain_admin_contact_help).html_safe
|
%p.domain-admin-contact-help= t(:domain_admin_contact_help).html_safe
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace :zonefile do
|
||||||
)
|
)
|
||||||
FROM domains d
|
FROM domains d
|
||||||
JOIN dnskeys dk ON dk.domain_id = d.id
|
JOIN dnskeys dk ON dk.domain_id = d.id
|
||||||
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter
|
WHERE d.name LIKE include_filter AND d.name NOT LIKE exclude_filter AND dk.flags = 257
|
||||||
),
|
),
|
||||||
chr(10)
|
chr(10)
|
||||||
) INTO tmp_var;
|
) INTO tmp_var;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue