Class: R509::Cert::Extensions::AuthorityInfoAccess

Inherits:
OpenSSL::X509::Extension
  • Object
show all
Defined in:
lib/r509/cert/extensions.rb

Overview

Implements the AuthorityInfoAccess certificate extension, with methods to provide access to the components and meaning of the extension's contents.

Constant Summary

OID =

friendly name for AIA OID

"authorityInfoAccess"

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (AuthorityInfoAccess) initialize(*args)

See OpenSSL::X509::Extension#initialize



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/r509/cert/extensions.rb', line 443

def initialize(*args)
  super(*args)

  data = R509::ASN1.get_extension_payload(self)
  @ocsp= R509::ASN1::GeneralNames.new
  @ca_issuers= R509::ASN1::GeneralNames.new
  data.entries.each do |access_description|
    #   AccessDescription  ::=  SEQUENCE {
    #           accessMethod          OBJECT IDENTIFIER,
    #           accessLocation        GeneralName  }
    case access_description.entries[0].value
    when "OCSP"
      @ocsp.add_item(access_description.entries[1])
    when "caIssuers"
      @ca_issuers.add_item(access_description.entries[1])
    end
  end
end

Instance Attribute Details

- (Object) ca_issuers (readonly)

An array of the CA issuers data, if any



440
441
442
# File 'lib/r509/cert/extensions.rb', line 440

def ca_issuers
  @ca_issuers
end

- (Object) ocsp (readonly)

An array of the OCSP data, if any



438
439
440
# File 'lib/r509/cert/extensions.rb', line 438

def ocsp
  @ocsp
end