class CertificateAuthority::Extensions::AuthorityInfoAccess

Specifies how to access CA information and services for the CA that issued this certificate. Generally used to specify OCSP servers. Reference: Section 4.2.2.1 of RFC3280 tools.ietf.org/html/rfc3280#section-4.2.2.1

Constants

OPENSSL_IDENTIFIER

Attributes

ca_issuers[RW]
critical[RW]
ocsp[RW]

Public Class Methods

new() click to toggle source
# File vendor/certificate_authority/lib/certificate_authority/extensions.rb, line 266
def initialize
  @critical = false
  @ocsp = []
  @ca_issuers = []
end
parse(value, critical) click to toggle source
# File vendor/certificate_authority/lib/certificate_authority/extensions.rb, line 287
def self.parse(value, critical)
  obj = self.new
  return obj if value.nil?
  obj.critical = critical
  value.split("\n").each do |v|
    if v =~ /^OCSP/
      obj.ocsp << v.split.last
    end

    if v =~ /^CA Issuers/
      obj.ca_issuers << v.split.last
    end
  end
  obj
end

Public Instance Methods

==(o) click to toggle source
# File vendor/certificate_authority/lib/certificate_authority/extensions.rb, line 283
def ==(o)
  o.class == self.class && o.state == state
end
openssl_identifier() click to toggle source
# File vendor/certificate_authority/lib/certificate_authority/extensions.rb, line 272
def openssl_identifier
  OPENSSL_IDENTIFIER
end
to_s() click to toggle source
# File vendor/certificate_authority/lib/certificate_authority/extensions.rb, line 276
def to_s
  res = []
  res += @ocsp.map {|o| "OCSP;URI:#{o}" }
  res += @ca_issuers.map {|c| "caIssuers;URI:#{c}" }
  res.join(',')
end

Protected Instance Methods

state() click to toggle source
# File vendor/certificate_authority/lib/certificate_authority/extensions.rb, line 304
def state
  [@critical,@ocsp,@ca_issuers]
end