Class: DNS::Zone::RR::RRSIG
Overview
‘RRSIG` resource record.
RFC 4034
Constant Summary collapse
- REGEX_RRSIG_RDATA =
%r{ (?<type_covered>\S+)\s* (?<algorithm>\d+)\s* (?<labels>\d+)\s* (?<original_ttl>#{DNS::Zone::RR::REGEX_TTL})\s* (?<signature_expiration>\d+)\s* (?<signature_inception>\d+)\s* (?<key_tag>\d+)\s* (?<signer>#{DNS::Zone::RR::REGEX_DOMAINNAME})\s* (?<signature>#{DNS::Zone::RR::REGEX_CHARACTER_STRING})\s* }mx
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#key_tag ⇒ Object
Returns the value of attribute key_tag.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#original_ttl ⇒ Object
Returns the value of attribute original_ttl.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#signature_expiration ⇒ Object
Returns the value of attribute signature_expiration.
-
#signature_inception ⇒ Object
Returns the value of attribute signature_inception.
-
#signer ⇒ Object
Returns the value of attribute signer.
-
#type_covered ⇒ Object
Returns the value of attribute type_covered.
Attributes inherited from Record
Instance Method Summary collapse
Methods inherited from Record
#general_prefix, #initialize, #load_general_and_get_rdata, #type
Constructor Details
This class inherits a constructor from DNS::Zone::RR::Record
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def algorithm @algorithm end |
#key_tag ⇒ Object
Returns the value of attribute key_tag.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def key_tag @key_tag end |
#labels ⇒ Object
Returns the value of attribute labels.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def labels @labels end |
#original_ttl ⇒ Object
Returns the value of attribute original_ttl.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def original_ttl @original_ttl end |
#signature ⇒ Object
Returns the value of attribute signature.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def signature @signature end |
#signature_expiration ⇒ Object
Returns the value of attribute signature_expiration.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def signature_expiration @signature_expiration end |
#signature_inception ⇒ Object
Returns the value of attribute signature_inception.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def signature_inception @signature_inception end |
#signer ⇒ Object
Returns the value of attribute signer.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def signer @signer end |
#type_covered ⇒ Object
Returns the value of attribute type_covered.
18 19 20 |
# File 'lib/dns/zone/rr/rrsig.rb', line 18 def type_covered @type_covered end |
Instance Method Details
#dump ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/dns/zone/rr/rrsig.rb', line 21 def dump parts = general_prefix parts << type_covered parts << algorithm parts << labels parts << original_ttl parts << signature_expiration parts << signature_inception parts << key_tag parts << signer parts << signature parts.join(' ') end |
#load(string, options = {}) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/dns/zone/rr/rrsig.rb', line 35 def load(string, = {}) rdata = load_general_and_get_rdata(string, ) return nil unless rdata captures = rdata.match(REGEX_RRSIG_RDATA) return nil unless captures @type_covered = captures[:type_covered] @algorithm = captures[:algorithm].to_i @labels = captures[:labels].to_i @original_ttl = captures[:original_ttl].to_i @signature_expiration = captures[:signature_expiration].to_i @signature_inception = captures[:signature_inception].to_i @key_tag = captures[:key_tag].to_i @signer = captures[:signer] @signature = captures[:signature] self end |