Class: R509::ASN1::PolicyInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/r509/asn1.rb

Overview

PolicyInformation ::= SEQUENCE {

policyIdentifier   CertPolicyId,
policyQualifiers   SEQUENCE SIZE (1..MAX) OF
                        PolicyQualifierInfo OPTIONAL }

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (PolicyInformation) initialize(data)

A new instance of PolicyInformation



300
301
302
303
304
305
306
307
308
309
310
# File 'lib/r509/asn1.rb', line 300

def initialize(data)
  # store the policy identifier OID
  @policy_identifier = data.entries[0].value
  # iterate the policy qualifiers if any exist
  if not data.entries[1].nil?
    @policy_qualifiers = PolicyQualifiers.new
    data.entries[1].each do |pq|
      @policy_qualifiers.parse(pq)
    end
  end
end

Instance Attribute Details

- (Object) policy_identifier (readonly)

Returns the value of attribute policy_identifier



299
300
301
# File 'lib/r509/asn1.rb', line 299

def policy_identifier
  @policy_identifier
end

- (Object) policy_qualifiers (readonly)

Returns the value of attribute policy_qualifiers



299
300
301
# File 'lib/r509/asn1.rb', line 299

def policy_qualifiers
  @policy_qualifiers
end