Class: R509::ASN1::PolicyQualifiers

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

Overview

PolicyQualifierInfo ::= SEQUENCE {

policyQualifierId  PolicyQualifierId,
qualifier          ANY DEFINED BY policyQualifierId }

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (PolicyQualifiers) initialize

A new instance of PolicyQualifiers



318
319
320
321
# File 'lib/r509/asn1.rb', line 318

def initialize
  @cps_uris = []
  @user_notices = []
end

Instance Attribute Details

- (Object) cps_uris (readonly)

Returns the value of attribute cps_uris



317
318
319
# File 'lib/r509/asn1.rb', line 317

def cps_uris
  @cps_uris
end

- (Object) user_notices (readonly)

Returns the value of attribute user_notices



317
318
319
# File 'lib/r509/asn1.rb', line 317

def user_notices
  @user_notices
end

Instance Method Details

- (Object) parse(data)

parse each PolicyQualifier and store the results into the object array



324
325
326
327
328
329
330
331
332
# File 'lib/r509/asn1.rb', line 324

def parse(data)
  oid = data.entries[0].value
  case
  when oid == 'id-qt-cps'
    @cps_uris << data.entries[1].value
  when oid == 'id-qt-unotice'
    @user_notices <<  UserNotice.new(data.entries[1])
  end
end