Class: Resolv::DNS::Resource::IN::TLSA

Inherits:
Object
  • Object
show all
Defined in:
lib/resolv/dns/resource/in/tlsa.rb

Defined Under Namespace

Modules: CertificateUsage, MatchingType, Selector

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ TLSA

Returns a new instance of TLSA.



26
27
28
# File 'lib/resolv/dns/resource/in/tlsa.rb', line 26

def initialize(data)
  @certificate_usage, @selector, @matching_type, @certificate_association_data = data.unpack('CCCH*')
end

Instance Attribute Details

#certificate_association_dataObject (readonly)

Returns the value of attribute certificate_association_data.



30
31
32
# File 'lib/resolv/dns/resource/in/tlsa.rb', line 30

def certificate_association_data
  @certificate_association_data
end

#certificate_usageObject (readonly)

Returns the value of attribute certificate_usage.



30
31
32
# File 'lib/resolv/dns/resource/in/tlsa.rb', line 30

def certificate_usage
  @certificate_usage
end

#matching_typeObject (readonly)

Returns the value of attribute matching_type.



30
31
32
# File 'lib/resolv/dns/resource/in/tlsa.rb', line 30

def matching_type
  @matching_type
end

#selectorObject (readonly)

Returns the value of attribute selector.



30
31
32
# File 'lib/resolv/dns/resource/in/tlsa.rb', line 30

def selector
  @selector
end

Instance Method Details

#end_entity?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/resolv/dns/resource/in/tlsa.rb', line 32

def end_entity?
  [CertificateUsage::PKIX_EE, CertificateUsage::DANE_EE].include?(certificate_usage)
end