Class: Gem::Resolv::DNS::Resource::CAA
- Inherits:
-
Gem::Resolv::DNS::Resource
- Object
- Query
- Gem::Resolv::DNS::Resource
- Gem::Resolv::DNS::Resource::CAA
- Defined in:
- lib/rubygems/vendor/resolv/lib/resolv.rb
Overview
CAA resource record defined in RFC 8659
These records identify certificate authority allowed to issue certificates for the given domain.
Constant Summary collapse
- TypeValue =
257
Constants inherited from Gem::Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
Flags for this proprty: - Bit 0 : 0 = not critical, 1 = critical.
-
#tag ⇒ Object
readonly
Property tag (“issue”, “issuewild”, “iodef”…).
-
#value ⇒ Object
readonly
Property value.
Attributes inherited from Gem::Resolv::DNS::Resource
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#critical? ⇒ Boolean
Whether the critical flag is set on this property.
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#initialize(flags, tag, value) ⇒ CAA
constructor
Creates a new CAA for
flags
,tag
andvalue
.
Methods inherited from Gem::Resolv::DNS::Resource
Constructor Details
#initialize(flags, tag, value) ⇒ CAA
Creates a new CAA for flags
, tag
and value
.
2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2552 def initialize(flags, tag, value) unless (0..255) === flags raise ArgumentError.new('flags must be an Integer between 0 and 255') end unless (1..15) === tag.bytesize raise ArgumentError.new('length of tag must be between 1 and 15') end @flags = flags @tag = tag @value = value end |
Instance Attribute Details
#flags ⇒ Object (readonly)
Flags for this proprty:
-
Bit 0 : 0 = not critical, 1 = critical
2569 2570 2571 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2569 def flags @flags end |
#tag ⇒ Object (readonly)
Property tag (“issue”, “issuewild”, “iodef”…).
2574 2575 2576 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2574 def tag @tag end |
#value ⇒ Object (readonly)
Property value.
2579 2580 2581 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2579 def value @value end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
2594 2595 2596 2597 2598 2599 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2594 def self.decode_rdata(msg) # :nodoc: flags, = msg.get_unpack('C') tag = msg.get_string value = msg.get_bytes self.new flags, tag, value end |
Instance Method Details
#critical? ⇒ Boolean
Whether the critical flag is set on this property.
2584 2585 2586 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2584 def critical? flags & 0x80 != 0 end |
#encode_rdata(msg) ⇒ Object
:nodoc:
2588 2589 2590 2591 2592 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2588 def encode_rdata(msg) # :nodoc: msg.put_pack('C', @flags) msg.put_string(@tag) msg.put_bytes(@value) end |