Class: CertificateAuthority::OCSPRequestReader

Inherits:
Object
  • Object
show all
Defined in:
lib/certificate_authority/ocsp_handler.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ocsp_requestObject

Returns the value of attribute ocsp_request.



52
53
54
# File 'lib/certificate_authority/ocsp_handler.rb', line 52

def ocsp_request
  @ocsp_request
end

#raw_ocsp_requestObject

Returns the value of attribute raw_ocsp_request.



51
52
53
# File 'lib/certificate_authority/ocsp_handler.rb', line 51

def raw_ocsp_request
  @raw_ocsp_request
end

Class Method Details

.from_der(request_body) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/certificate_authority/ocsp_handler.rb', line 60

def self.from_der(request_body)
  reader = OCSPRequestReader.new
  reader.raw_ocsp_request = request_body
  reader.ocsp_request = OpenSSL::OCSP::Request.new(request_body)

  reader
end

Instance Method Details

#serial_numbersObject



54
55
56
57
58
# File 'lib/certificate_authority/ocsp_handler.rb', line 54

def serial_numbers
  @ocsp_request.certid.collect do |cert_id|
    cert_id.serial
  end
end