Class: R509::ASN1::NoticeReference

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

Overview

NoticeReference ::= SEQUENCE {

organization     DisplayText,
noticeNumbers    SEQUENCE OF INTEGER }

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (NoticeReference) initialize(data)

A new instance of NoticeReference



358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/r509/asn1.rb', line 358

def initialize(data)
  data.each do |notice_reference|
    # if it's displaytext then it's the organization
    # if it's YET ANOTHER ASN1::Sequence, then it's noticeNumbers
    if notice_reference.kind_of?(OpenSSL::ASN1::Sequence)
      @notice_numbers = []
      notice_reference.each do |ints|
        @notice_numbers << ints.value
      end
    else
      @organization = notice_reference.value
    end
  end
end

Instance Attribute Details

- (Object) notice_numbers (readonly)

Returns the value of attribute notice_numbers



357
358
359
# File 'lib/r509/asn1.rb', line 357

def notice_numbers
  @notice_numbers
end

- (Object) organization (readonly)

Returns the value of attribute organization



357
358
359
# File 'lib/r509/asn1.rb', line 357

def organization
  @organization
end