module EPPClient::SecDNS

This implements the DNSSEC bits.

Constants

SCHEMAS_SECDNS

Public Class Methods

new(args) click to toggle source
Calls superclass method
# File lib/epp-client/secdns.rb, line 14
def initialize(args)
  super
  @extensions << EPPClient::SCHEMAS_URL['secDNS-1.1']
end

Public Instance Methods

domain_create(domain) click to toggle source

Extends the EPPClient::Domain#domain_create so that the specific secDNS create informations can be sent, the additionnal informations are :

either:

:keyData

containing an array of keyData objects as described in the #domain_info function.

:dsData

containing an array of dsData objects as described in the #domain_info function.

Optionnaly :

:maxSigLife

as described in the #domain_info function.

Calls superclass method
# File lib/epp-client/secdns.rb, line 94
def domain_create(domain)
  super # placeholder so that I can add some doc
end
domain_info(domain) click to toggle source

Extends the EPPClient::Domain#domain_info so that the specific secDNS elements can be added.

either:

:keyData

containing an array of keyData objects with the following fields :

:flags

The flags field value as described in section 2.1.1 of RFC 4034.

:protocol

The protocol field value as described in section 2.1.2 of RFC 4034.

:alg

The algorithm number field value as described in section 2.1.3 of RFC 4034.

:pubKey

The encoded public key field value as described in Section 2.1.4 of RFC 4034.

:dsData

containing an array of dsData objects with the following fields :

:keyTag

The key tag value as described in Section 5.1.1 of RFC 4034.

:alg

The algorithm value as described in Section 5.1.2 of RFC 4034.

:digestType

The digest type value as described in Section 5.1.3 of RFC 4034.

:digest

The digest value as described in Section 5.1.1 of RFC 4034.

:keyData

An optional element that describes the key data used as input in the DS hash calculation for use in server validation. The :keyData element contains the child elements defined above.

Optionnaly :

:maxSigLife

An element that indicates a child's preference for the number of seconds after signature generation when the parent's signature on the DS information provided by the child will expire.

Calls superclass method
# File lib/epp-client/secdns.rb, line 61
def domain_info(domain)
  super # placeholder so that I can add some doc
end
domain_update(args) click to toggle source

Extends the EPPClient::Domain#domain_update so that secDNS informations can be sent, the additionnal informations are contained in an :secDNS object :

:rem

To remove keys or ds from the delegation, with possible attributes one of :

:all

used to remove all DS and key data with a value of boolean true. A value of boolean false will do nothing. Removing all DS information can remove the ability of the parent to secure the delegation to the child zone.

:dsData

an array of dsData elements described in the #domain_info function.

:keyData

an array of keyData elements as described in the #domain_info function.

:add

To add keys or DS from the delegation, with possible attributes one of :

:dsData

an array of dsData elements described in the #domain_info function.

:keyData

an array of keyData elements as described in the #domain_info function.

:chg

contains security information to be changed, one of :

:maxSigLife

optional, as described in the #domain_info function.

Calls superclass method
# File lib/epp-client/secdns.rb, line 150
def domain_update(args)
  super # placeholder so that I can add some doc
end

Private Instance Methods

make_ds_data(xml, ds) click to toggle source
# File lib/epp-client/secdns.rb, line 213
def make_ds_data(xml, ds)
  xml.dsData do
    xml.keyTag ds[:keyTag]
    xml.alg ds[:alg]
    xml.digestType ds[:digestType]
    xml.digest ds[:digest]
    make_key_data(xml, ds[:keyData]) if ds.key?(:keyData)
  end
end
make_key_data(xml, key) click to toggle source
# File lib/epp-client/secdns.rb, line 204
def make_key_data(xml, key)
  xml.keyData do
    xml.flags key[:flags]
    xml.protocol key[:protocol]
    xml.alg key[:alg]
    xml.pubKey key[:pubKey]
  end
end
parse_ds_data(xml) click to toggle source
# File lib/epp-client/secdns.rb, line 232
def parse_ds_data(xml)
  ret = {
    :keyTag => xml.xpath('secDNS:keyTag', EPPClient::SCHEMAS_URL).text.to_i,
    :alg => xml.xpath('secDNS:alg', EPPClient::SCHEMAS_URL).text.to_i,
    :digestType => xml.xpath('secDNS:digestType', EPPClient::SCHEMAS_URL).text.to_i,
    :digest => xml.xpath('secDNS:digest', EPPClient::SCHEMAS_URL).text,
  }
  unless (keyData = xml.xpath('secDNS:keyData', EPPClient::SCHEMAS_URL)).empty?
    ret[:keyData] = parse_key_data(keyData)
  end
  ret
end
parse_key_data(xml) click to toggle source
# File lib/epp-client/secdns.rb, line 223
def parse_key_data(xml)
  {
    :flags => xml.xpath('secDNS:flags', EPPClient::SCHEMAS_URL).text.to_i,
    :protocol => xml.xpath('secDNS:protocol', EPPClient::SCHEMAS_URL).text.to_i,
    :alg => xml.xpath('secDNS:alg', EPPClient::SCHEMAS_URL).text.to_i,
    :pubKey => xml.xpath('secDNS:pubKey', EPPClient::SCHEMAS_URL).text,
  }
end